Bug 122650

Summary: ASTParser.createBindings(IJavaElement[]) returns wrong element
Product: [Eclipse Project] JDT Reporter: Philip Mayer <eclipsetalk2>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: markus.kell.r
Version: 3.2   
Target Milestone: 3.2 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Philip Mayer CLA 2006-01-04 13:18:20 EST
When invoking createBindings() with an IMethod of a generic method inside a class file in a jar with or without attached source, a type binding instead of a method binding is returned, for example in the following case for foo:

----------
package gTest;

public class Test4 {
	<E> void foo(E e) {
	}
}
----------

For non-generic methods or methods which only use their declaring types' type parameters, the correct method binding is returned.
Comment 1 Jerome Lanneluc CLA 2006-03-10 07:46:45 EST
Fixed NamedMember#getKey(IMethod, boolean) to include the type parameters in the key.

Added regression test ASTModelBridgeTests#testCreateBindings18()
Comment 2 Maxime Daniel CLA 2006-03-27 11:30:22 EST
Verified for 3.2M6 using warm-up build I20060327-0010.