Bug 132974 - [compiler] missing error on uninitialized final local
Summary: [compiler] missing error on uninitialized final local
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.2 M6   Edit
Assignee: Maxime Daniel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-23 05:19 EST by Maxime Daniel CLA
Modified: 2006-04-13 11:16 EDT (History)
0 users

See Also:


Attachments
HEAD - suggested fix plus test case (2.44 KB, patch)
2006-03-23 05:54 EST, Maxime Daniel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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