Summary: | [compiler][null] invalid analysis when redundant check is done | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Joris Verschoor <jbverschoor> | ||||
Component: | Core | Assignee: | Maxime Daniel <maxime_daniel> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | max.gilead | ||||
Version: | 3.2 | ||||||
Target Milestone: | 3.2 M6 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Joris Verschoor
2006-02-15 08:15:57 EST
Agreed A case of second occurrence diagnostic. Agree that the given example looks odd. Still, how would you cope with the following: String s = ""; if (s != null) { // (a) System.out.println(s); } else { s.toString(); // (b) } s.toString(); // (c) Current implementation (3.2 M5) complains on a, b and c. The current bug asks that c stops complaining. What about b? Created attachment 35413 [details] Fix with test cases Added NullReferenceTest tests # 333 to 335 (the last is not activated, see fup bug 129581 for details). The idea of the fix is to merge definite non null with protected null into a non potential null. This does not work for 335 because we only have protected non null in the then branch. Fixed and released in HEAD. *** Bug 129122 has been marked as a duplicate of this bug. *** Verified for 3.2 M6 using warm-up build I20060327-0010. |