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 61858 - NPE thrown when having cursor on line with error
Summary: NPE thrown when having cursor on line with error
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords: RANDOM
: 62242 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-08-05 14:21 UTC by Milan Kubec
Modified: 2005-09-05 10:01 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
exc stack trace (937 bytes, text/plain)
2005-08-05 14:29 UTC, Milan Kubec
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Kubec 2005-08-05 14:21:37 UTC
[200508041800, JDK 1.5.0_04]

I was editing java source file and used not yet declared variable. After
finishing editing I got NullPointerException. Cursor was on the line with error.
The exception was poping up periodically after closing the exc dialog every 2
sec. After I moved cursor on different line no exceptions were thrown, but only
until I moved the cursor on the line with error.

java.lang.NullPointerException
	at
org.netbeans.modules.java.hints.CreateElementJavaHint.<init>(CreateElementJavaHint.java:32)
	at
org.netbeans.modules.java.hints.CreateFieldJavaHint.<init>(CreateFieldJavaHint.java:38)
	at
org.netbeans.modules.java.hints.JavaHintsProvider.handleUnresolvedHints(JavaHintsProvider.java:638)
Comment 1 Milan Kubec 2005-08-05 14:29:02 UTC
Created attachment 23529 [details]
exc stack trace
Comment 2 Tomas Hurka 2005-08-05 14:38:21 UTC
Please attach your source file. I cannot reproduce it.
Comment 3 Milan Kubec 2005-08-05 15:11:49 UTC
Cannot reproduce it either now on the same source file.
Comment 4 Milan Kubec 2005-08-12 13:58:04 UTC
Happening again on different source file now it's method call with not existing
argument. If cursor is on the line exceptions keep poping up. The file is form file.
Comment 5 Lukas Hasik 2005-08-14 21:18:52 UTC
happend to me too. With non-existing method. Unable to reproduce when restarted
IDE :( 
Comment 6 Lukas Hasik 2005-08-14 21:19:10 UTC
*** Issue 62242 has been marked as a duplicate of this issue. ***
Comment 7 Martin Krauskopf 2005-08-14 22:11:42 UTC
Also happening to me on linux. IMHO must be fixed for 4.2 (P3 -> P2). At least
get rid of NPE should be easy enough, huh? ;)
Comment 8 Pavel Flaska 2005-08-16 09:13:09 UTC
Fixed.

Checking in src/org/netbeans/modules/java/hints/JavaHintsProvider.java;
/cvs/java/hints/src/org/netbeans/modules/java/hints/JavaHintsProvider.java,v 
<--  JavaHintsProvider.java
new revision: 1.39; previous revision: 1.38
done
Comment 9 Milan Kubec 2005-08-18 09:34:18 UTC
Cannot reproduce in dev-200508171800. Verified.