Bug 81727 - [1.5] Redundant warning of parameterized return type
Summary: [1.5] Redundant warning of parameterized return type
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-21 08:16 EST by baikuo21 CLA
Modified: 2005-02-15 12:39 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 baikuo21 CLA 2004-12-21 08:16:08 EST
Version: 3.1M4 (or others ?)

interface Foo<T extends Foo> {
	T foo();
}

class FooImpl implements Foo<FooImpl> {
	public FooImpl foo() { // Here I get a warning
		return null;
	}
}

Here is the warning JDT reported:

Type safety: The return type FooImpl of the method foo() of type FooImpl needs
unchecked conversion to conform to the return type T of inherited method

According to the draft of the JLS 3rd edition and the javac (of Sun jdk1.5.0),
there should be no error or warning.
Comment 1 Frederic Fusier CLA 2004-12-27 05:24:22 EST
Please do not change our prefix in summary. This is our internal way to classify
them. This 1.5 because this classification was done before 1.5 becomes 5.0. If
you change it, our bugzilla requests will not return the right list and your bug
may be missed...
Also do not change target, this is owner responsibility. When it will be set,
this informs you in which milestone this bug will be fixed...
Thanks
Comment 2 Kent Johnson CLA 2005-01-04 15:37:42 EST
This was fixed just after M4.

Added MethodVerify test028.
Comment 3 David Audel CLA 2005-02-15 12:39:43 EST
Verified in I20050214-0927