Bug 11011

Summary: incorrect 'variable never used' warning
Product: [Eclipse Project] JDT Reporter: Adam Kiezun <akiezun>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 M4   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Adam Kiezun CLA 2002-03-08 05:10:47 EST
public class A {
	void f(boolean flag){
		boolean a;  //<<<incorrect 'variable never used' warning
		if (flag)
			a= true;
		else
			a= false;	
	}
}
Comment 1 Olivier Thomann CLA 2002-03-08 09:52:08 EST
I think 'never used' means that the value of this variable is never used. In your  example, you store 
a value in 'a', but you never read the value from 'a'. Then this variable is useless.
Comment 2 Adam Kiezun CLA 2002-03-08 10:01:31 EST
it's only a wording problem then.
would 'variable never read' be better?

for me, 'used' means 'read or assigned to'
Comment 3 Philipe Mulet CLA 2002-03-08 10:58:07 EST
It is a wording problem. 
Comment 4 Philipe Mulet CLA 2002-03-11 05:33:23 EST
Fixed error message wording.