Community
Participate
Working Groups
Created attachment 287555 [details] Maven project that reproduces the bug Probably related to https://bugs.eclipse.org/bugs/show_bug.cgi?id=533475 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=526911 The attached maven project configures a mixed 11/8 build. In these settings, not settable from outside maven with a normal eclipse project (build config dialog has errors), the generated code outputs: Exception in thread "main" java.lang.IllegalAccessError: Update to static final field BugRepro$MyInterface.$SWITCH_TABLE$BugRepro$MyEnum attempted from a different method ($SWITCH_TABLE$BugRepro$MyEnum) than the initializer method <clinit> at BugRepro$MyInterface.$SWITCH_TABLE$BugRepro$MyEnum(BugRepro.java:9) at BugRepro$MyInterface.theMethod(BugRepro.java:14) at BugRepro.main(BugRepro.java:6) This is part of the codegen for a switch over an enum, when inside a default method in an interface with mixed 11/8 settings.
I tried the following 1. Ran the attached project with Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537), Java version: 11.0.7. I could not get this problem reproduced 2. Created similar project in eclipse with source level 1.8 and target to 11. Still I could not get this problem reproduced. Since the maven project attached uses default maven-compiler-plugin not eclipse compiler I am wondering whether this is related to eclipse.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.