Bug 82032 - Incorrect generic type safety warning in 3.1M4
Summary: Incorrect generic type safety warning in 3.1M4
Status: RESOLVED DUPLICATE of bug 79687
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P3 minor (vote)
Target Milestone: 3.1 M5   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-30 15:36 EST by David Gates CLA
Modified: 2005-01-11 11:00 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 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 ***