This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 255084 - ClassCastException: com.sun.tools.javac.tree.JCTree$JCExpressionStatement cannot be cast to com.sun.source.tree.ClassTree
Summary: ClassCastException: com.sun.tools.javac.tree.JCTree$JCExpressionStatement can...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords: JDK_9
Depends on:
Blocks:
 
Reported: 2015-09-08 09:46 UTC by Alexandr Scherbatiy
Modified: 2015-11-30 19:09 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 219779


Attachments
stacktrace (7.47 KB, text/plain)
2015-09-08 09:46 UTC, Alexandr Scherbatiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2015-09-08 09:46:16 UTC
Build: NetBeans Dev JDK9 branch (Build 201506180405)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.40-b15, Java(TM) SE Runtime Environment, 1.8.0_40-ea-b11
OS: Mac OS X

User Comments:
sunflower: Open a file




Stacktrace: 
java.lang.ClassCastException: com.sun.tools.javac.tree.JCTree$JCExpressionStatement cannot be cast to com.sun.source.tree.ClassTree
   at org.netbeans.modules.java.source.pretty.VeryPretty.adjustSpans(VeryPretty.java:2413)
   at org.netbeans.modules.java.source.pretty.VeryPretty.printAnnotationsFormatted(VeryPretty.java:2449)
   at org.netbeans.modules.java.source.pretty.VeryPretty.printAnnotations(VeryPretty.java:2461)
   at org.netbeans.modules.java.source.pretty.VeryPretty.visitClassDef(VeryPretty.java:737)
   at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:750)
   at org.netbeans.modules.java.source.pretty.VeryPretty.doAccept(VeryPretty.java:426)
Comment 1 Alexandr Scherbatiy 2015-09-08 09:46:18 UTC
Created attachment 155956 [details]
stacktrace
Comment 2 Dusan Balek 2015-11-19 13:37:23 UTC
Fixed in jet-main jdk9 branch.

http://hg.netbeans.org/jet-main/rev/0e60dabd56ec
Comment 3 Quality Engineering 2015-11-30 19:09:15 UTC
Integrated into 'main-silver', will be available in build *201511301649* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/0e60dabd56ec
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #255084 - ClassCastException: com.sun.tools.javac.tree.JCTree$JCExpressionStatement cannot be cast to com.sun.source.tree.ClassTree - fixed.