Bug 132974

Summary: [compiler] missing error on uninitialized final local
Product: [Eclipse Project] JDT Reporter: Maxime Daniel <maxime_daniel>
Component: CoreAssignee: Maxime Daniel <maxime_daniel>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: 3.2 M6   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
HEAD - suggested fix plus test case none

Description Maxime Daniel CLA 2006-03-23 05:19:59 EST
HEAD 20060323
The following should complain about l not being initialized:
public class X {
  public void foo(boolean b) {
	final Object l;
	do {
	  if (b) {
		l = new Object();
		break;
	  }
	} while (false);
	l.toString(); // complain
  }
}

The message absence is due to the fix for bug 129371.
Comment 1 Maxime Daniel CLA 2006-03-23 05:54:19 EST
Created attachment 36801 [details]
HEAD - suggested fix plus test case
Comment 2 Maxime Daniel CLA 2006-03-23 05:57:03 EST
Added test case FlowAnalysisTest #24.

The issue is due to a side effect upon flowInfo into DoStatement.analyseCode when baking in the upstream flow info. Note that the other loops do not incur the similar side effect.

Launching tests before releasing.
Comment 3 Maxime Daniel CLA 2006-03-23 08:05:38 EST
Fixed and released in HEAD.
Comment 4 David Audel CLA 2006-04-13 11:16:16 EDT
The Target Milestone must be 3.2M6 and not 3.2RC1. I correct it.

Verified for 3.2 M6 using build 3.2M6