Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8044067 | 9 | Paul Govereau | P4 | Closed | Fixed | b15 |
JDK-8048469 | 8u25 | Paul Govereau | P4 | Resolved | Fixed | b05 |
JDK-8052616 | emb-8u26 | Paul Govereau | P4 | Resolved | Fixed | b17 |
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows 7 (64 bit)
Linux (64 bit)
A DESCRIPTION OF THE PROBLEM :
On our open-source project BRJS (https://github.com/BladeRunnerJS/brjs), we have seen that when we renamed a public abstract class to 'AbstractAssetLocation', it throws a NullPointerException with the Java 8 compiler.
--------------------------------------------------
An exception has occurred in the compiler (1.8.0). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.lang.NullPointerException
at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.trackable(Flow.java:1479)
at com.sun.tools.javac.comp.Flow$AssignAnalyzer.checkInit(Flow.java:2454)
at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.checkInit(Flow.java:1555)
at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitIdent(Flow.java:2328)
at com.sun.tools.javac.tree.JCTree$JCIdent.accept(JCTree.java:2005)
at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:389)
at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scan(Flow.java:1367)
at com.sun.tools.javac.tree.TreeScanner.visitSelect(TreeScanner.java:264)
at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1891)
at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:389)
at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scan(Flow.java:1367)
at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scanExpr(Flow.java:1596)
at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitApply(Flow.java:2204)
at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1459)
at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:389)
at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scan(Flow.java:1367)
at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scanExpr(Flow.java:1596)
at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scanExprs(Flow.java:1608)
at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitApply(Flow.java:2205)
at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1459)
....
--------------------------------------------------
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Environment setup:
set JAVA7_HOME to point to Java7
set JAVA8_HOME to point to Java8
Get the code:
git clone https://github.com/BladeRunnerJS/brjs
git checkout d8a4af2
cd into 'brjs' folder
execute 'gradlew compileJava'
See that this command fails with the stack trace detailed in the description.
If you checkout the commit prior to this:
git checkout 4ac3238
gradlew compileJava
- see that this now passes
The list of commits in this specific Pull Request can be found here:
- https://github.com/BladeRunnerJS/brjs/pull/599
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expected result is that there is no compilation error.
ACTUAL -
Java 1.8.0 Java compiler throws NullPointerException
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
If I rename the class and prefix it with an 'X' (refactoring it via Eclipse) to 'XAbstractAssetLocation', the issue goes away for Windows 7, but still fails for Linux 64bit.
- backported by
-
JDK-8048469 Java 8 compiler throws NullPointerException depending location in source file
- Resolved
-
JDK-8052616 Java 8 compiler throws NullPointerException depending location in source file
- Resolved
-
JDK-8044067 Java 8 compiler throws NullPointerException depending location in source file
- Closed
- duplicates
-
JDK-8037388 Invocation of protected method of base class does not compile
- Closed
- relates to
-
JDK-8062747 Compiler error when anonymous class uses method with parametrized exception
- Closed
-
JDK-8054210 NullPointerException when compiling specific code.
- Closed