Bug 81258 - IMethodBinding#getJavaElement() is null with inferred method parameterization
Summary: IMethodBinding#getJavaElement() is null with inferred method parameterization
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M4   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-15 12:50 EST by Markus Keller CLA
Modified: 2004-12-15 20:26 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 Markus Keller CLA 2004-12-15 12:50:50 EST
200412142000

getJavaElement() is null for the binding of the method invocation A.method(..)
in User#m():

public class User {
	void m() {
		A.method(new ArrayList<Number>());
	}
}

class A {
	static <T extends Number> T method(List<? extends T> arg) {
		return arg.get(0);
	}
}
Comment 1 Jerome Lanneluc CLA 2004-12-15 13:04:04 EST
Is your test case complete ? Or you're not importing List and ArrayList on purpose ?
Comment 2 Jerome Lanneluc CLA 2004-12-15 13:34:47 EST
To answer myself, even if importing java.util.* the Java element is null.
Comment 3 Jerome Lanneluc CLA 2004-12-15 17:32:07 EST
Changed Member#areSimilarMethods and #findMethhods to use the type erasure of
the parameter types.
Added regression test ASTModelBridgeTest#testMethod4()
Comment 4 Olivier Thomann CLA 2004-12-15 20:26:28 EST
Verified in 200412160010