Bug 90186 - resolved key of methods should contain parametrized types
Summary: resolved key of methods should contain parametrized types
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 M7   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 87174
  Show dependency tree
 
Reported: 2005-04-04 12:56 EDT by Martin Aeschlimann CLA
Modified: 2005-05-12 13:53 EDT (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 Martin Aeschlimann CLA 2005-04-04 12:56:35 EDT
20050404

In the following code, do a code resolve of 'get' and get the resolved key of this.
	public void goo(ArrayList<String> a) {
		a.get(0);
	}

The key is "(I)Ljava.lang.Object;"
but the return type should be 'String'
Comment 1 David Audel CLA 2005-04-21 05:58:25 EDT
The method binding computed by SelectionEngine is correct but generic binary
method binding modifiers are not set to AccGenericSignature.
MethodBinding#computeUniqueKey(...) use MethodBinding#genericSignature(). But
this method return null when AccGenericSignature is not set and
MethodBinding#signature() is called instead. That's why the key is not correct.

The correct key should be "Ljava/util/ArrayList<Ljava/lang/String;>;.get(I)TE;"
and not Ljava/util/ArrayList<Ljava/lang/String;>;.get(I)Ljava/lang/Object;
Comment 2 David Audel CLA 2005-04-27 04:11:45 EDT
Philippe - binary method binding could be flag as AccGenericSignature ?
If not, we need to temporary flag the method during key computation.
Comment 3 David Audel CLA 2005-05-03 06:29:06 EDT
Now binary method modifier contain AccGenericSignature.

Fixed and test added
  ResolvedTests_1_5#test0094()
Comment 4 Olivier Thomann CLA 2005-05-12 13:53:57 EDT
Verified in I20050510-0010 + JDT/Core v_556