Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 234549

Summary: [compiler][null] Redundant null check warning fooled by assert
Product: [Eclipse Project] JDT Reporter: Olivier Lefevre <lefevrol>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.3.2   
Target Milestone: 3.4 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Bug8.java none

Description Olivier Lefevre CLA 2008-05-29 04:11:40 EDT
Build ID: M20080221-1800

Steps To Reproduce:
ecj -warn:+null Bug8.java

More information:
assert is a runtime feature; the compiler cannot know that -ea will be specified and should conservatively treat the check as non-redundant.
Comment 1 Olivier Lefevre CLA 2008-05-29 04:13:02 EDT
Created attachment 102581 [details]
Bug8.java
Comment 2 Maxime Daniel CLA 2008-05-29 04:36:13 EDT
This is a deliberate design decision. Please see details in duplicate bug 198044.

*** This bug has been marked as a duplicate of bug 198044 ***
Comment 3 Frederic Fusier CLA 2008-09-16 10:22:20 EDT
Verified during 3.5M2 milestone verification process...