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 - ClassCastException: com.sun.tools.javac.tree.JCTree$JCMethodDecl cannot be cast to com.sun.source.tree.StatementTree
Summary: ClassCastException: com.sun.tools.javac.tree.JCTree$JCMethodDecl cannot be ca...
Status: NEW
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:
Depends on:
Blocks:
 
Reported: 2015-06-01 14:32 UTC by Jiri Prox
Modified: 2015-08-31 11:21 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 217663


Attachments
stacktrace (2.94 KB, text/plain)
2015-06-01 14:32 UTC, Jiri Prox
Details

Note You need to log in before you can comment on or make changes to this bug.
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