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

Summary: ClassCastException: com.sun.tools.javac.code.Symbol$TypeSymbol cannot be cast to javax.lang.model.element.TypeElement
Product: contrib Reporter: michbarsinai <michbarsinai>
Component: CodeAssignee: issues@contrib <issues>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 174934
Attachments: stacktrace

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