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 236830 - 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 DUPLICATE of bug 236885
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-07 12:43 UTC by Michel Graciano
Modified: 2014-07-16 09:32 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 204406


Attachments
stacktrace (1.92 KB, text/plain)
2013-10-07 12:43 UTC, Michel Graciano
Details
Sample project (1.78 MB, application/zip)
2013-10-07 12:52 UTC, Michel Graciano
Details
stacktrace (2.12 KB, text/plain)
2014-01-16 22:27 UTC, Michel Graciano
Details
stacktrace (2.12 KB, text/plain)
2014-01-16 22:30 UTC, Michel Graciano
Details
stacktrace (1.92 KB, text/plain)
2014-07-15 15:19 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2013-10-07 12:43:21 UTC
Build: NetBeans IDE 7.4 RC2 (Build 201309252201)
VM: Java HotSpot(TM) 64-Bit Server VM, 24.0-b56, Java(TM) SE Runtime Environment, 1.7.0_40-b43
OS: Linux

User Comments:
hmichel: Trying to find usages for builder() method created by Lombok. I tried it using Navigator view.




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.ui.WhereUsedPanelMethod.initialize(WhereUsedPanelMethod.java:218)
   at org.netbeans.modules.refactoring.java.ui.WhereUsedPanel$1.run(WhereUsedPanel.java:155)
   at org.netbeans.modules.refactoring.java.ui.WhereUsedPanel$1.run(WhereUsedPanel.java:144)
   at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:493)
   at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:593)
   at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:155)
Comment 1 Michel Graciano 2013-10-07 12:43:22 UTC
Created attachment 140853 [details]
stacktrace
Comment 2 Michel Graciano 2013-10-07 12:52:57 UTC
Created attachment 140855 [details]
Sample project

Steps to reproduce:

1. Open the class Bean
2. Go to Navigator view, right click at builder() method and choose Find Usages
3. The exception is thrown.
Comment 3 Michel Graciano 2014-01-16 22:27:47 UTC
Created attachment 144053 [details]
stacktrace

Find Usages (vis Navigator) of a setter created by Lombok.
Comment 4 Michel Graciano 2014-01-16 22:30:47 UTC
Created attachment 144054 [details]
stacktrace

Fund Usages (via Navigator) for a setter created by Lombok
Comment 5 Exceptions Reporter 2014-07-15 15:19:20 UTC
Created attachment 148069 [details]
stacktrace

Invoked "Find Usage" on a constructor which is created via Lombok annotation in the Navigator window
Comment 6 Ralph Ruijs 2014-07-16 09:32:05 UTC

*** This bug has been marked as a duplicate of bug 236885 ***