Summary: | [compiler][null] Incorrect null analysis involving do_while loop | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Gordon Henriksen <malanon> | ||||
Component: | Core | Assignee: | Maxime Daniel <maxime_daniel> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | eclipse, mlists | ||||
Version: | 3.2 | ||||||
Target Milestone: | 3.3 M3 | ||||||
Hardware: | Macintosh | ||||||
OS: | Mac OS X - Carbon (unsup.) | ||||||
Whiteboard: | |||||||
Bug Depends on: | |||||||
Bug Blocks: | 157154 | ||||||
Attachments: |
|
Description
Gordon Henriksen
2006-06-14 17:04:44 EDT
Agreed. Following shorter test case should remove any doubt about it: public class X { String f; void foo (boolean b) { X x = new X(); do { System.out.println(x.f); // yields may be null, whereas it is not first // time, and is protected by the test thereafter if (b) { x = null; } } while (x != null); } } Added (inactive) test NullReferenceTest#613. Created attachment 50447 [details]
Suggested fix plus activated test case
Mistakenly used the action flow info in input for the looping context late check. Must use the upstream flow instead.
Waiting for 3.3 M2 to be declared before committing.
Released for 3.3M3. Verified for 3.3 M3 using warm-up build I20061030-0010 Changing OS from Mac OS to Mac OS X as per bug 185991 |