Bug 88769

Summary: IMethodBinding#getJavaElement() drops extra array dimensions and varargs
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 88860    

Description Markus Keller CLA 2005-03-22 12:00:16 EST
v_542

IMethodBinding#getJavaElement() drops extra array dimensions and varargs:

public class TestArray {
    public int[] bar(int a[]) {
        // element is (nonexistent): test1.TestArray.bar(int)
        return a;
    }
    public Object[] bar2(Object[] o[][]) [][] {
        // element is (nonexistent): test1.TestArray.bar2(Object[])
        return o;
    }
    
    public void bar3(Object... objs) {      
        // element is (nonexistent): test1.TestArray.bar3(Object)
    }
}
Comment 1 Jerome Lanneluc CLA 2005-04-20 06:11:22 EDT
Changed MethodBinding#getJavaElement() to create an array type signature if the
parameter is an array type or a varargs.

Added regression tests ASTModelBridgeTests#testMethod7(), testMethod8(),
testMethod9()
Comment 2 Frederic Fusier CLA 2005-05-11 11:12:06 EDT
Verified for 3.1 M7 using build I20050509-2010 + jdt.core HEAD.