Workaround for javac compilation order bug in maven

后端 未结 5 2059
栀梦
栀梦 2020-12-09 16:34

I\'m encountering a bug in the Java compiler where the order of files submitted for compilation can cause code not to compile. I\'ve drilled down the code to isolate the sma

5条回答
  •  难免孤独
    2020-12-09 17:23

    I played around, and found that adding simple cast:

    public static void main(String[] args) {
        ((ActionSpec)Actions.SKIP).run("hello");
    }
    

    solves this problem. Passing this enum as method parameter as interface would also do the trick

提交回复
热议问题