Details
-
Bug
-
Resolution: Fixed
-
P1
-
9
-
b01
-
Not verified
Description
The fix for JDK-8020216 should be delta applied as it breaks the build for 9.
Error message:
java.lang.ClassCastException: com.sun.tools.javac.code.Symbol$MethodSymbol cannot be cast to com.sun.tools.javac.code.Symbol$ClassSymbol
at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.isFinalUninitializedField(Flow.java:1493)
at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.isFinalUninitializedStaticField(Flow.java:1498)
at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.markDead(Flow.java:1472)
at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitThrow(Flow.java:2218)
at com.sun.tools.javac.tree.JCTree$JCThrow.accept(JCTree.java:1401)
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.visitIf(Flow.java:2181)
at com.sun.tools.javac.tree.JCTree$JCIf.accept(JCTree.java:1263)
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.scan(TreeScanner.java:57)
at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitBlock(Flow.java:1833)
at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:903)
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.visitIf(Flow.java:2181)
at com.sun.tools.javac.tree.JCTree$JCIf.accept(JCTree.java:1263)
Error message:
java.lang.ClassCastException: com.sun.tools.javac.code.Symbol$MethodSymbol cannot be cast to com.sun.tools.javac.code.Symbol$ClassSymbol
at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.isFinalUninitializedField(Flow.java:1493)
at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.isFinalUninitializedStaticField(Flow.java:1498)
at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.markDead(Flow.java:1472)
at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitThrow(Flow.java:2218)
at com.sun.tools.javac.tree.JCTree$JCThrow.accept(JCTree.java:1401)
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.visitIf(Flow.java:2181)
at com.sun.tools.javac.tree.JCTree$JCIf.accept(JCTree.java:1263)
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.scan(TreeScanner.java:57)
at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitBlock(Flow.java:1833)
at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:903)
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.visitIf(Flow.java:2181)
at com.sun.tools.javac.tree.JCTree$JCIf.accept(JCTree.java:1263)
Attachments
Issue Links
- relates to
-
JDK-8020216 javac, compile time error isn't shown when final static field is not assigned
-
- Closed
-
-
JDK-8030218 javac, compile time error isn't shown when final static field is not assigned, follow-up
-
- Closed
-