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 252724

Summary: ClassCastException: com.sun.tools.javac.tree.JCTree$JCMethodDecl cannot be cast to com.sun.source.tree.StatementTree
Product: java Reporter: Jiri Prox <jiriprox>
Component: CompilerAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: normal CC: enissay
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 217663
Attachments: stacktrace

Description Jiri Prox 2015-06-01 14:32:17 UTC
This bug was originally marked as duplicate of bug 208635, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 20150601-9b36ac08d2ea)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.45-b02, Java(TM) SE Runtime Environment, 1.8.0_45-b14
OS: Windows 7

User Comments:
jiriprox: CCE when applying invalid custom hint




Stacktrace: 
java.lang.ClassCastException: com.sun.tools.javac.tree.JCTree$JCMethodDecl cannot be cast to com.sun.source.tree.StatementTree
   at org.netbeans.modules.java.source.builder.TreeFactory.Block(TreeFactory.java:217)
   at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.rewriteChildren(ImmutableTreeTranslator.java:673)
   at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.visitBlock(ImmutableTreeTranslator.java:383)
   at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.visitBlock(ImmutableTreeTranslator.java:97)
   at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1004)
   at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:146)
Comment 1 Jiri Prox 2015-06-01 14:32:18 UTC
Created attachment 153991 [details]
stacktrace