Bug 90186

Summary: resolved key of methods should contain parametrized types
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: philippe_mulet
Version: 3.1   
Target Milestone: 3.1 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 87174    

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