Bug 122650 - ASTParser.createBindings(IJavaElement[]) returns wrong element
Summary: ASTParser.createBindings(IJavaElement[]) returns wrong element
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M6   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-04 13:18 EST by Philip Mayer CLA
Modified: 2006-03-27 11:30 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.