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 49097

Summary: ClassCastException: org.netbeans.jmi.javamodel.TypeCast$Impl
Product: java Reporter: _ gtzabari <gtzabari>
Component: UnsupportedAssignee: Daniel Prusa <dprusa>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 4.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Attachments: Stack-trace
Source code that triggers exception

Description _ gtzabari 2004-09-15 15:07:19 UTC
dev build 200409121800

I run "fix imports" on the attached code and get
the attached exception.
Comment 1 _ gtzabari 2004-09-15 15:07:38 UTC
Created attachment 17658 [details]
Stack-trace
Comment 2 _ gtzabari 2004-09-15 15:08:55 UTC
Created attachment 17659 [details]
Source code that triggers exception
Comment 3 _ gtzabari 2004-09-15 15:11:38 UTC
This is caused by the first "(JTree)" in the following line of code
(which you'll find in the attached source-code):

   (JTree) tree = (JTree) e.getSource();

Basically it is true that there is a compiler error in the code and it
is malformed, but this shouldn't cause exceptions to be thrown.
Comment 4 Daniel Prusa 2004-10-25 16:44:37 UTC
This issue seems to be fixed, I cannot reproduce it in the current
build (it was reliably reproducible in the dev build 200409121800).