Bug 77808

Summary: [1.5][dom] type bindings for raw List and List<E> have same key
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3 CC: martinae
Version: 3.1   
Target Milestone: 3.1 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2004-11-04 04:51:20 EST
200411022000

The type bindings for a raw List and a List<E> (from declaration or from
aListBinding.getErasure()) have the same key "java.util/List".

I think the second one should be something like "java.util/List<E>"
Comment 1 Jerome Lanneluc CLA 2004-11-08 11:51:03 EST
Changed the binding key of parameterized type to include the type parameters.
Added regression test ASTConverter15Tests#test061()
Comment 2 Markus Keller CLA 2004-11-09 10:45:22 EST
Nope, with the code in HEAD and in I20041109-0800, both versions still have the
same key (which is 'java.util/List<E:java.lang.Object,>' now).
Comment 3 Markus Keller CLA 2004-11-09 13:57:49 EST
I don't get it. There must be some randomness involved here. I have this CU:

package test;
import java.util.List;
public class A {
	List li;
}

The key of the type binding for 'List' (in field declaration) is
'java.util/List<E:java.lang.Object,>'. 

However, in this CU, the key of the same type binding is 'java.util/List':

package test;
import java.util.List;
public class B {
	List li;
	void test(List list, Integer integer) {
		list.add(integer);
	}
}

Raising severity to major.
Comment 4 Jerome Lanneluc CLA 2004-11-16 06:00:54 EST
Sorry about that Markus. I changed the key for parameterized types and generic
types, but this changed the raw type key as well, when it should have stayed the
same.

Fixed in HEAD. Added regression test ASTConverter15Test#test0066.
Comment 5 Frederic Fusier CLA 2004-12-14 13:29:09 EST
Verified for 3.1 M4 using build I200412140800.
Using ASTView 1.0.2.