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 84645 - NPE at org.netbeans.modules.j2ee.verification.JEEVerificationHintsProvider.getHints()
Summary: NPE at org.netbeans.modules.j2ee.verification.JEEVerificationHintsProvider.ge...
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Tomasz Slota
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2006-09-11 20:14 UTC by _ gtzabari
Modified: 2006-09-15 07:43 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stack-trace (413 bytes, text/plain)
2006-09-11 20:15 UTC, _ gtzabari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2006-09-11 20:14:46 UTC
dev build 200609090000

I randomly get the attached exception when closing an editor tab.
Comment 1 _ gtzabari 2006-09-11 20:15:02 UTC
Created attachment 33790 [details]
stack-trace
Comment 2 Tomasz Slota 2006-09-12 16:49:23 UTC
Raising priority to P2 so that it can be fixed during high resistance. Justification: a dialog box with error 
message, can be quite annoying to the user.


I am not able to reproduce it and the code has been there for a long time so it looks like this occurs in 
very specific situation. However I should be able to provide at least a workaround based only on the stack 
trace quickly.
Comment 3 Tomasz Slota 2006-09-13 13:33:25 UTC
fixed. Change log:

http://j2ee.netbeans.org/source/browse/j2ee/verification/src/org/netbeans/modules/j2ee/verification/
JEEVerificationHintsProvider.java?r1=1.1.2.7&r2=1.1.2.7.6.1
Comment 4 Marek Fukala 2006-09-14 14:18:24 UTC
The fix looks OK to me though I am slightly concerned about source of the NPE.
There are more unchecked methods calls like error.getAttachedAnnotatable() which
for the first sight might return null. So I would recomend you to check also the
others, but if you are sure that they cannot be null, go ahead a commit.
Comment 5 Tomasz Slota 2006-09-14 14:45:36 UTC
I have added additional check for null value based on Marek's review.

/cvs/j2ee/verification/src/org/netbeans/modules/j2ee/verification/Attic/
JEEVerificationProblemMark.java,v  <--  JEEVerificationProblemMark.java
new revision: 1.1.2.8.2.1; previous revision: 1.1.2.8
Comment 6 Marek Fukala 2006-09-14 14:47:59 UTC
I am OK with the fix and afree with commiting to release55 branch.
Comment 7 Tomasz Slota 2006-09-14 15:04:39 UTC
Committing to the 'release55' branch.

Checking in JEEVerificationProblemMark.java;
/cvs/j2ee/verification/src/org/netbeans/modules/j2ee/verification/Attic/
JEEVerificationProblemMark.java,v  <--  JEEVerificationProblemMark.java
new revision: 1.1.2.9; previous revision: 1.1.2.8
done
Checking in JEEVerificationHintsProvider.java;
/cvs/j2ee/verification/src/org/netbeans/modules/j2ee/verification/Attic/
JEEVerificationHintsProvider.java,v  <--  JEEVerificationHintsProvider.java
new revision: 1.1.2.8; previous revision: 1.1.2.7
Comment 8 Jindrich Sedek 2006-09-15 07:43:10 UTC
Verified NetBeans5.5Dev 200609150000
No exceptions during closing editor tab