Bug 342475

Summary: ITypeBinding.getQualifiedName() returns a generic signature
Product: [Eclipse Project] JDT Reporter: Pascal Filion <pascal.filion>
Component: CoreAssignee: Ayushman Jain <amj87.iitr>
Status: VERIFIED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: amj87.iitr, srikanth_sankaran
Version: 3.7   
Target Milestone: 3.7 M7   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Pascal Filion CLA 2011-04-11 13:29:03 EDT
I have a ITypeBindng for java.util.List, which was retrieved for a class field type: "private List<Employee> employees".

The ITypeBindings for the interfaces java.util.List extend does not return the non-generic fully qualified name. ITypeBinding.getQualifiedName() returns java.util.Collection<E> for the ITypeBinding of java.util.Collection. However the Javadoc says: "Note that the type parameters of a generic type are not included". Is the return value wrong or is the Javadoc wrong?
Comment 1 Ayushman Jain CLA 2011-04-12 03:01:13 EDT
Since here using a parameterized type reference to find the ITypeBinding, the javadoc clearly says "For type bindings that correspond to particular instances of a generic type arising from a parameterized type reference, the fully qualified name is the fully qualified name of the erasure type followed by the fully qualified names of the type arguments surrounded by "<>" and separated by ",". Example: "java.util.Collection<java.lang.String>"

So i think this is correct.
Comment 2 Pascal Filion CLA 2011-04-12 09:29:08 EDT
Thanks for the information.
Comment 3 Ayushman Jain CLA 2011-04-12 10:56:28 EDT
Closing as invalid.
Comment 4 Srikanth Sankaran CLA 2011-04-25 02:14:04 EDT
Verified for 3.7 M7