Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using JDK 17+ in preview mode + using an annotation processor causes NPE #414

Closed
rsmckinney opened this issue Jan 7, 2023 · 1 comment
Closed
Labels

Comments

@rsmckinney
Copy link
Member

java: An exception has occurred in the compiler (17.0.5). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com/) after checking the Bug Database (http://bugs.java.com/) for duplicates. Include your program, the following diagnostic, and the parameters passed to the Java compiler in your report. Thank you.
java: java.lang.NullPointerException: Cannot invoke "java.util.Queue.add(Object)" because "this.deferred" is null
java: at jdk.compiler/com.sun.tools.javac.util.Log$DeferredDiagnosticHandler.report(Log.java:150)
java: at jdk.compiler/com.sun.tools.javac.util.Log.report(Log.java:660)
java: at jdk.compiler/com.sun.tools.javac.util.AbstractLog.mandatoryNote(AbstractLog.java:252)
java: at jdk.compiler/com.sun.tools.javac.util.MandatoryWarningHandler.logMandatoryNote(MandatoryWarningHandler.java:273)
java: at jdk.compiler/com.sun.tools.javac.util.MandatoryWarningHandler.reportDeferredDiagnostic(MandatoryWarningHandler.java:180)
java: at jdk.compiler/com.sun.tools.javac.code.Preview.reportDeferredDiagnostics(Preview.java:237)
java: at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.reportDeferredDiagnostics(JavaCompiler.java:1715)
java: at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:962)
java: at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
java: at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152)
java: at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
java: at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
java: at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:237)
java: at org.jetbrains.jps.incremental.java.JavaBuilder.lambda$compileJava$2(JavaBuilder.java:524)
java: at org.jetbrains.jps.incremental.java.JavaBuilder.invokeJavac(JavaBuilder.java:587)
java: at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:522)
java: at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:365)
java: at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:290)
java: at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:244)
java: at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1519)
java: at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:1149)
java: at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1299)
java: at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:1114)
java: at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:885)
java: at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:467)
java: at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:197)
java: at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:150)
java: at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:357)
java: at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:179)
java: at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:218)
java: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
java: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
java: at java.base/java.lang.Thread.run(Thread.java:833)
java: Compilation failed: internal java compiler error

@rsmckinney rsmckinney added the bug label Jan 7, 2023
rsmckinney added a commit that referenced this issue Jan 7, 2023
- update logger in compiler's preview handlers
@rsmckinney rsmckinney changed the title Using JDK 17+ in preview mode causes NPE Using JDK 17+ in preview mode + using an annotation processor causes NPE Jan 7, 2023
@rsmckinney
Copy link
Member Author

Fix available with release 2022.1.34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant