Bug 236830 - ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol cannot be cast to javax.lang.model.element.ExecutableElement
ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol cannot be cas...
Status: RESOLVED DUPLICATE of bug 236885
Product: java
Classification: Unclassified
Component: Refactoring
All All
: P3 (vote)
: 8.0.1
Assigned To: Ralph Ruijs
Depends on:
  Show dependency treegraph
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

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

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.

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]
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]

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]

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]

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 ***

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo