Bug 64305

Summary: [1.5] Bad "return type is incompatible" error for array values
Product: [Eclipse Project] JDT Reporter: Paul Krause <paulkrause88>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.1 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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.