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 66918 - [gjast] [50cat] ClassCastException with generics
Summary: [gjast] [50cat] ClassCastException with generics
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Jan Becicka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-16 22:02 UTC by jlaskowski
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
ClassCastException: org.netbeans.lib.gjast.ASTreeNode (3.72 KB, text/plain)
2005-10-16 22:03 UTC, jlaskowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jlaskowski 2005-10-16 22:02:11 UTC
[ BUILD # : 200510131600 ]
[ JDK VERSION : 1.5.0_05 ]

Steps to reproduce:

1/ New Project->General->Java Application - defaults are fine.
2/ Paste the following code:

package myapp;

public class Outer {
    class Inner<T extends Number> {}
    
    public static void main(String[] args) {
        Outer.Inner<Integer> oi = Outer.new Inner<Integer>();
    }
}

and you'll see the attached ClassCastException. 

To get rid of the error popup window, quickly remove the new keyword after Outer class, but it's very tricky.
Comment 1 jlaskowski 2005-10-16 22:03:15 UTC
Created attachment 26013 [details]
ClassCastException: org.netbeans.lib.gjast.ASTreeNode
Comment 2 Jan Becicka 2005-10-19 14:00:38 UTC
Checking in MDRParser.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/parser/MDRParser.java,v 
<--  MDRParser.java
new revision: 1.88; previous revision: 1.87
done