Bug 64305 - [1.5] Bad "return type is incompatible" error for array values
Summary: [1.5] Bad "return type is incompatible" error for array values
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M1   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-27 07:11 EDT by Paul Krause CLA
Modified: 2005-01-11 11:02 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 Paul Krause CLA 2004-05-27 07:11:30 EDT
This is Cheetah5 + Eclipse 3.0M9.

Compiler complience level: 1.5
Source compatibility: 1.5
Class compatibility: 1.5
Unsafe type operation: Warning
Generic type parameter with final bound: Warning

Here is test case the demonstrates the problem.
-----------------------------------------
public class TestAdapterFactory implements 
org.eclipse.core.runtime.IAdapterFactory{
    public Object getAdapter(Object adaptable, Class type) {
        return null;
    }
    public Class[] getAdapterList() {
        return null;
    }
}
------------------------------------------
The compiler incorrectly reports 
	The return type is incompatible with IAdapterFactory.getAdapterList().

Note that to trigger the error, the overridden method must be defined in a 
different jar file.
Comment 1 Philipe Mulet CLA 2004-07-03 11:35:37 EDT
Reproduced with Cheetah06.

Method verifier incorrectly signals an error, where super method is:
public Class[] getAdapterList();
Comment 2 Kent Johnson CLA 2004-07-05 16:26:56 EDT
Fixed simple case.

See GenericTypeTest 149 for further work on additional cases.