Bug 220788

Summary: [compiler][null] potential null pointer access warning looks bogus
Product: [Eclipse Project] JDT Reporter: Darin Wright <darin.eclipse>
Component: CoreAssignee: Stephan Herrmann <stephan.herrmann>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P5 CC: amj87.iitr, Olivier_Thomann, stephan.herrmann
Version: 3.4   
Target Milestone: 3.6 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Darin Wright CLA 2008-02-28 12:38:32 EST
With org.eclipse.debug.ui from HEAD as source in a workspace, I get a warning like:

"Potential null pointer access: The variable categories may be null at this location"

ContextualLaunchAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions	line 248

Inspecting the code, the variable is assigned before this access, and I don't see how it could be null:
Comment 1 Maxime Daniel CLA 2008-03-10 04:46:20 EDT
Reproduced.

Released inactive NullReferenceTest#470.

This won't get high priority.

However, I believe that the test against null on line 239 is not needed. Removing it gets the warning of line 248 away. (I'm not telling there is no bug here... just that this may be an appropriate work around.) 
Comment 2 Stephan Herrmann CLA 2011-02-28 07:42:32 EST
(In reply to comment #1)
> Released inactive NullReferenceTest#470.

This test has been enabled during bug 190737.
Should we mark this as closed/duplicate of that bug?

Darin, are you still seeing the warning?
Comment 3 Olivier Thomann CLA 2011-03-04 08:43:13 EST
Closing as a dup.

*** This bug has been marked as a duplicate of bug 190737 ***
Comment 4 Ayushman Jain CLA 2011-03-07 05:38:59 EST
Verified for 3.7M6 using build I20110301-1537.