Bug 220788 - [compiler][null] potential null pointer access warning looks bogus
Summary: [compiler][null] potential null pointer access warning looks bogus
Status: VERIFIED DUPLICATE of bug 190737
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P5 normal (vote)
Target Milestone: 3.6 M4   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-28 12:38 EST by Darin Wright CLA
Modified: 2011-03-07 05:38 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.