Bug 79756 - Erroneous compile error "The local variable may not have been initialized"
Summary: Erroneous compile error "The local variable may not have been initialized"
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 3.1 M4   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-30 04:18 EST by Markus Keller CLA
Modified: 2004-12-14 22:40 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2004-11-30 04:18:48 EST
I200411240800 + zrh-plugins & jdt.core from 20041130_0923:

This class compiled without error in I200411240800, but gives an error
"The local variable message may not have been initialized" with jdt.core from HEAD.

javac 1.5.0 also compiles without error.

This leads to compile errors in jdt.core (Signature.java, Scribe.java) and in
jdt.junit (RemoteTestRunnerClient.java).

public class C {
	private Object fBufferedReader= null;

	void foo() {
		String message;
		while(fBufferedReader != null && (message= readMessage(fBufferedReader)) != null)
			receiveMessage(message);
	}

	private String readMessage(Object bufferedReader) {
		return null;
	}

	private void receiveMessage(String message) {
	}
}
Comment 1 Philipe Mulet CLA 2004-11-30 04:23:12 EST
This is a known regression and we are working on it.
Comment 2 Philipe Mulet CLA 2004-11-30 05:03:27 EST
Condition analysis was missing updating condInfo.
Added regression test: AssignmentTest#test032.
Fixed
Comment 3 Olivier Thomann CLA 2004-12-14 22:40:21 EST
Verified in 200412140800