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 193292 - ClassCastException: com.sun.tools.javac.code.Symbol$TypeSymbol cannot be cast to javax.lang.model.element.TypeElement
Summary: ClassCastException: com.sun.tools.javac.code.Symbol$TypeSymbol cannot be cast...
Status: NEW
Alias: None
Product: contrib
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: issues@contrib
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-12 12:45 UTC by michbarsinai
Modified: 2010-12-13 12:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 174934


Attachments
stacktrace (2.18 KB, text/plain)
2010-12-12 12:45 UTC, michbarsinai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description michbarsinai 2010-12-12 12:45:07 UTC
Build: NetBeans IDE Dev (Build nbms-and-javadoc-6305-on-101210)
VM: Java HotSpot(TM) Client VM, 17.1-b03, Java(TM) SE Runtime Environment, 1.6.0_22-b04
OS: Linux

User Comments:
michbarsinai: Code Completion for a generic type that extends JComponent (T extends JComponent)
in a generic method:
private <T extends JComponent> T orient( T comp ) {
		comp.setComponentOrientation(*boom*)




Stacktrace: 
java.lang.ClassCastException: com.sun.tools.javac.code.Symbol$TypeSymbol cannot be cast to javax.lang.model.element.TypeElement
   at org.netbeans.modules.java.editor.ext.fold.ClosureCodeCompletion.evalType(ClosureCodeCompletion.java:196)
   at org.netbeans.modules.java.editor.ext.fold.ClosureCodeCompletion.computeItems(ClosureCodeCompletion.java:253)
   at org.netbeans.modules.java.editor.ext.fold.ClosureCodeCompletion$1.run(ClosureCodeCompletion.java:126)
   at org.netbeans.modules.java.editor.ext.fold.ClosureCodeCompletion$1.run(ClosureCodeCompletion.java:122)
   at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:482)
   at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:154)
Comment 1 michbarsinai 2010-12-12 12:45:12 UTC
Created attachment 103981 [details]
stacktrace