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 211398 - ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol cannot be cast to javax.lang.model.element.ExecutableElement
Summary: ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol cannot be cas...
Status: RESOLVED INCOMPLETE
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-18 14:33 UTC by aldobrucale
Modified: 2012-04-26 13:56 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 187137


Attachments
stacktrace (6.86 KB, text/plain)
2012-04-18 14:33 UTC, aldobrucale
Details
stacktrace (6.84 KB, text/plain)
2012-04-19 15:08 UTC, aldobrucale
Details
stacktrace (6.86 KB, text/plain)
2012-04-26 13:56 UTC, aldobrucale
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aldobrucale 2012-04-18 14:33:01 UTC
Build: NetBeans IDE Dev (Build 201204170400)
VM: Java HotSpot(TM) Client VM, 22.1-b02, Java(TM) SE Runtime Environment, 1.7.0_03-b04
OS: Linux

User Comments:
aldobrucale: Tried to inline a protected final method




Stacktrace: 
java.lang.ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol cannot be cast to javax.lang.model.element.ExecutableElement
   at org.netbeans.modules.refactoring.java.plugins.InlineMethodTransformer.visitMethodInvocation(InlineMethodTransformer.java:152)
   at org.netbeans.modules.refactoring.java.plugins.InlineMethodTransformer.visitMethodInvocation(InlineMethodTransformer.java:63)
   at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1338)
   at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:67)
   at org.netbeans.modules.refactoring.java.plugins.InlineMethodTransformer.scan(InlineMethodTransformer.java:91)
   at org.netbeans.modules.refactoring.java.plugins.InlineMethodTransformer.scan(InlineMethodTransformer.java:63)
Comment 1 aldobrucale 2012-04-18 14:33:07 UTC
Created attachment 118459 [details]
stacktrace
Comment 2 Ralph Ruijs 2012-04-19 09:46:23 UTC
Hard to fix without a reproducible test case. Are you able to reproduce the
issue? If so, could you please create a simple test case and attach it to the
issue? Thanks.
Comment 3 aldobrucale 2012-04-19 15:08:29 UTC
Created attachment 118525 [details]
stacktrace

Inline a public function
Comment 4 aldobrucale 2012-04-19 16:49:29 UTC
I've not been able to reproduce, but it happened again. Is there any logger I may enable to help understand what is happening?
Comment 5 aldobrucale 2012-04-26 13:56:29 UTC
Created attachment 118811 [details]
stacktrace

Tried to inline a public static method. The only reference to the method I'm inlining is in the class in which it is defined. I have just removed all other references but still not compiled all the projects that were using it.