Bug 264159

Summary: Unexpected warning "Potential null pointer access" in assert message
Product: [Eclipse Project] JDT Reporter: Jan Schnabel <jschnab>
Component: CoreAssignee: Ayushman Jain <amj87.iitr>
Status: VERIFIED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: Mike_Wilson, Olivier_Thomann
Version: 3.5   
Target Milestone: 3.6 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Jan Schnabel CLA 2009-02-09 07:41:16 EST
Build ID: 3.4.1

Steps To Reproduce:
Activate "Potential programming problems" --> "Potential null pointer access" (warning)
insert the following lines in you code:
Object o = null;
assert o == null : o.getClass();
I get a warning "Potential null pointer access: The variable o may be null at this location"


More information:
Comment 1 Mike Wilson CLA 2009-05-05 12:55:11 EDT
Changing Version tag to something more believable.
Comment 2 Ayushman Jain CLA 2009-12-10 07:53:14 EST
In version 3.5 as well as 3.6M3, i can see the expected warning "Redundant null check: The variable o can only be null at this location" on o == null.

Can you please upgrade?
Comment 3 Jan Schnabel CLA 2009-12-10 08:11:21 EST
I'm working with M20091202-0800 and actually the reported warning isn't displayed anymore. Maybe it's already fixed since 3.5? I reported it against 3.4.1
Comment 4 Ayushman Jain CLA 2009-12-10 08:23:19 EST
Yes you won't get the unexpected warning if you use 3.5 or latter.
Comment 5 Jan Schnabel CLA 2009-12-10 08:32:40 EST
so I propose to close the bug.
Comment 6 Olivier Thomann CLA 2009-12-10 08:57:57 EST
Closing as WORKSFORME.
Comment 7 Olivier Thomann CLA 2010-01-25 14:23:13 EST
Verified for 3.6M5 using I20100125-0800