Bug 82032

Summary: Incorrect generic type safety warning in 3.1M4
Product: [Eclipse Project] JDT Reporter: David Gates <gatesda>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: minor    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M5   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description David Gates CLA 2004-12-30 15:36:27 EST
The Eclipse compiler incorrectly reports an unchecked conversion.  Code tested
and passed using javac with the -Xlint:all flag.

Compiler settings are default except for compiler compliance level, which is the
default 5.0 setting.

Warning text:
Type safety: The return type Integer of the method make() of type IntegerFactory
needs 
 unchecked conversion to conform to the return type T of inherited method

---Example---

interface Factory<T> {
	public T make();
}

class IntegerFactory implements Factory<Integer> {
	public Integer make() { //warning marker on "Integer"
		return 0;
	}
}
Comment 1 Jerome Lanneluc CLA 2005-01-04 06:30:11 EST

*** This bug has been marked as a duplicate of 79687 ***