Community
Participate
Working Groups
Build ID: M20071023-1652 Steps To Reproduce: import java.util.Random; public class Bug { public static class Dummy { // Only here so I have something to call public static int foo() { return new Random().nextInt(); } public static int bar() { return new Random().nextInt(); } public static int baz() { return new Random().nextInt(); } } public void bug() { RuntimeException e = null; while (e != null || Dummy.foo() > 0) { if (e != null || Dummy.bar() > 0) break; // always breaks out of the loop if e non-null if (Dummy.baz() > 0) e = new RuntimeException(); } if (e != null) throw e; } } The last if incorrectly states that e is always null. More information: This also happens if the test for the break is if ( Dummy.bar() > 0) break; but not if it is if (e != null) break; So it seems like it is not considering ALL breaks as reasons for a loop condition being true after the loop.
Could reproduce it with M20070905-1045, but not with I20071204-1547. Must be a dupe of bug 184298.
Released NullReferenceTest#467-469 (thanks for the test cases). (Fredéric, as discussed, I'll rely on you for the verification - thx.) *** This bug has been marked as a duplicate of bug 184298 ***
Verified using I20070921-0919 (aka 3.4M2)