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
> Task :compileJava FAILED
/private/var/folders/jf/29g0fz_16w9_3y2db8ylkl540000gn/T/junit1380605189140352106/src/main/java/test/TimeZoneJava16.java:7: error: An unhandled exception was thrown by the Error Prone static analysis plugin.
return TimeZone.getTimeZone("PST");
^
Please report this at https://github.com/google/error-prone/issues/new and include the following:
error-prone version: 2.5.1
BugPattern: ThreeLetterTimeZoneID
Stack Trace:
java.lang.IllegalAccessError: class com.google.errorprone.VisitorState (in unnamed module @0x51b6b93c) cannot access class com.sun.tools.javac.model.JavacElements (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.model to unnamed module @0x51b6b93c
at com.google.errorprone.VisitorState.getElements(VisitorState.java:244)
at com.google.errorprone.bugpatterns.ThreeLetterTimeZoneID.matchMethodInvocation(ThreeLetterTimeZoneID.java:79)
at com.google.errorprone.scanner.ErrorProneScanner.processMatchers(ErrorProneScanner.java:450)
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
I also note that the doc suggests both --add-opens and -add-exports for com.sun.tools.javac.code. IIUC, --add-opens is a superset of --add-exports so --add-opens alone would be enough.
Description of the problem / feature request:
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
See tbroyer/gradle-errorprone-plugin#58
--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED
fixes it.Could there be an automated way of finding out all those cases? From the unit tests exercising all the bug patterns maybe?
What version of Error Prone are you using?
2.5.1
Have you found anything relevant by searching the web?
Related to #1157
The text was updated successfully, but these errors were encountered: