Community
Participate
Working Groups
Reproduced with Eclipse 3.2 Integration build: 20060208 OS: Windows XP eclipse-SDK-I20060208-0848-win32.zip Test Case: public class Test { public void test() { int ch; while ((char)(ch = 0) == 1) {}; if (ch == -1) ; // Compiler underlines "ch" and says that it may not have been initialized } } This is not a problem with Eclipse 3.2M4.
Only happens in compliance 1.3 mode.
Fixed and released in HEAD. Change is a better flow info composition into WhileStatement#analyseCode for the empty block, compliance <= 1.3 branch. Added test cases to FlowAnalysisTest (2 to 5). Verification can leverage the original test case, in 1.3 compliance level.
Verified for 3.2 M5 using build I20060214-0010