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.
I don't know how, but I got this hint. See screenshot. Activating it causes the attached exception. Sorry, folks, I don't possess any additional information. -- I'm working with NetBeans IDE Dev (Build 200701150200) 1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105 Windows XP version 5.1 running on x86 ru_RU (nb); Cp1251
Created attachment 38023 [details] Screenshot
Created attachment 38024 [details] Exception
Apparently it's caused by the types mismatch in the declaration and new construct. :) Sorry, just noticed. *confused* But it's an issue anyway.
I can see three different problems here: -the CCE: should be covered by issue #92348 -the "null" in the fix description - should be fixed now (see below) -proposal of incorrect cast hint (when the two types are not castable) - not fixed yet, not sure of I will manage it to M7, as it requires an API change. RCS file: /cvs/java/hints/test/unit/data/org/netbeans/test/java/hints/AddCast11.java,v done Checking in test/unit/data/org/netbeans/test/java/hints/AddCast11.java; /cvs/java/hints/test/unit/data/org/netbeans/test/java/hints/AddCast11.java,v <-- AddCast11.java initial revision: 1.1 done Checking in src/org/netbeans/modules/java/hints/AddCastCreator.java; /cvs/java/hints/src/org/netbeans/modules/java/hints/AddCastCreator.java,v <-- AddCastCreator.java new revision: 1.5; previous revision: 1.4 done Checking in test/unit/src/org/netbeans/modules/java/hints/JavaHintsTest.java; /cvs/java/hints/test/unit/src/org/netbeans/modules/java/hints/JavaHintsTest.java,v <-- JavaHintsTest.java new revision: 1.12; previous revision: 1.11 done RCS file: /cvs/java/hints/test/unit/data/goldenfiles/org/netbeans/modules/java/hints/JavaHintsTest/testAddCastHint11-hints.pass,v done Checking in test/unit/data/goldenfiles/org/netbeans/modules/java/hints/JavaHintsTest/testAddCastHint11-hints.pass; /cvs/java/hints/test/unit/data/goldenfiles/org/netbeans/modules/java/hints/JavaHintsTest/testAddCastHint11-hints.pass,v <-- testAddCastHint11-hints.pass initial revision: 1.1
Should be fixed: Checking in test/unit/src/org/netbeans/modules/java/hints/JavaHintsTest.java; /cvs/java/hints/test/unit/src/org/netbeans/modules/java/hints/JavaHintsTest.java,v <-- JavaHintsTest.java new revision: 1.13; previous revision: 1.12 done Checking in nbproject/project.properties; /cvs/java/hints/nbproject/project.properties,v <-- project.properties new revision: 1.23; previous revision: 1.22 done Checking in nbproject/project.xml; /cvs/java/hints/nbproject/project.xml,v <-- project.xml new revision: 1.21; previous revision: 1.20 done RCS file: /cvs/java/hints/test/unit/data/org/netbeans/test/java/hints/AddCast12.java,v done Checking in test/unit/data/org/netbeans/test/java/hints/AddCast12.java; /cvs/java/hints/test/unit/data/org/netbeans/test/java/hints/AddCast12.java,v <-- AddCast12.java initial revision: 1.1 done RCS file: /cvs/java/hints/test/unit/data/goldenfiles/org/netbeans/modules/java/hints/JavaHintsTest/testAddCastHint12-hints.pass,v done Checking in test/unit/data/goldenfiles/org/netbeans/modules/java/hints/JavaHintsTest/testAddCastHint12-hints.pass; /cvs/java/hints/test/unit/data/goldenfiles/org/netbeans/modules/java/hints/JavaHintsTest/testAddCastHint12-hints.pass,v <-- testAddCastHint12-hints.pass initial revision: 1.1 done Checking in src/org/netbeans/modules/java/hints/AddCastCreator.java; /cvs/java/hints/src/org/netbeans/modules/java/hints/AddCastCreator.java,v <-- AddCastCreator.java new revision: 1.6; previous revision: 1.5 done