tomdw/java-modules-context-boot

Remove workaround after JDK bug fix is available in JDK

tomdw opened this issue · 1 comments

tomdw commented

Problem when using xxxAnnotation methods on Module: java.lang.NoClassDefFoundError: module-info is not a class because access_flag ACC_MODULE is set

Waiting for fix in https://bugs.openjdk.java.net/browse/JDK-8241770 to be released in jdk.

Currently a workaround is implemented by forking some code from the jdk and applying the patch given in the JDK-8241770 issue.

Also logged: https://issues.apache.org/jira/browse/SUREFIRE-1765 as it is maven surefire that puts explicit modules with a module-info.class on the classpath and thus triggers this problem.

After JDK bug has been fixed removing this class and replace its usage with module.isAnnotationPresent and module.getAnnotation should be possible.

tomdw commented

fixed in 288364f