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 94330 - Cast null to List
Summary: Cast null to List
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on: 97542
Blocks:
  Show dependency tree
 
Reported: 2007-02-05 11:07 UTC by Kirill Sorokin
Modified: 2007-03-23 12:03 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot (11.32 KB, image/jpeg)
2007-02-05 11:11 UTC, Kirill Sorokin
Details
Exception (3.22 KB, text/plain)
2007-02-05 11:11 UTC, Kirill Sorokin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kirill Sorokin 2007-02-05 11:07:50 UTC
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
Comment 1 Kirill Sorokin 2007-02-05 11:11:29 UTC
Created attachment 38023 [details]
Screenshot
Comment 2 Kirill Sorokin 2007-02-05 11:11:51 UTC
Created attachment 38024 [details]
Exception
Comment 3 Kirill Sorokin 2007-02-05 11:17:08 UTC
Apparently it's caused by the types mismatch in the declaration and new
construct. :) Sorry, just noticed. *confused* But it's an issue anyway.
Comment 4 Jan Lahoda 2007-02-14 10:36:39 UTC
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
Comment 5 Jan Lahoda 2007-03-23 12:03:36 UTC
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