You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Annotation tests fail on Java 16+ with this error:
java.lang.IllegalAccessError: class com.google.testing.compile.Parser (in unnamed module @0xc267ef4) cannot access class com.sun.tools.javac.util.Context (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.util to unnamed module
The build.gradle for that module had the below workaround for this, but this no longer seems to work...
tasks.withType(Test.class) {
if (org.gradle.api.JavaVersion.current().isJava12Compatible()) { // only a problem from Java 16, but okay
// https:/google/compile-testing/issues/222
it.jvmArgs '--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED'
}
}
google/compile-testing#222 (comment) suggests fixing the tests to avoid some methods and do String comparison instead of relying on functionality that depends on the internal compiler.
E.g. in java/picocli/annotation/processing/tests/Issue769Test.java, the following change fixes the issue:
Related to #1930
Annotation tests fail on Java 16+ with this error:
The build.gradle for that module had the below workaround for this, but this no longer seems to work...
google/compile-testing#222 (comment) suggests fixing the tests to avoid some methods and do String comparison instead of relying on functionality that depends on the internal compiler.
E.g. in
java/picocli/annotation/processing/tests/Issue769Test.java
, the following change fixes the issue:The text was updated successfully, but these errors were encountered: