| Summary: | ASTTools.findTypeInHierarchy() does not handle parameterized type reference | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] Dali JPA Tools | Reporter: | Pascal Filion <pascal.filion> | ||||
| Component: | Framework | Assignee: | Karen Butzke <karenfbutzke> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | jolene.moffitt, karenfbutzke, neil.hauge | ||||
| Version: | 3.0 | Flags: | neil.hauge:
review+
|
||||
| Target Milestone: | 3.0.1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | fix_ready | ||||||
| Attachments: |
|
||||||
Refer to bug 342475 for more information. Created attachment 197803 [details]
proposed patch against head
checked in to HEAD for 3.0.1 Verified in Build I-3.4.0-20110812160550 Verified if you add the New Class to the Entity and Save no errors appear. See the link to view test steps for verification. http://wiki.eclipse.org/Dali_3.0.1 |
If the ITypeBinding is for a generic type, i.e. java.util.Collection<E> than ITypeBinding.getQualifiedName() returns the fully qualified class name with the generic type. 1. Create a new JPA project with EclipseLink as the platform. 2. Create a persistence.xml 3. Create a new JPA entity and add it to the persistence.xml 4. Create an interface: import org.eclipse.persistence.config.DescriptorCustomizer; public interface MyInterface<T> extends DescriptorCustomizer { } 5. Create a new class that implements the interface: import org.eclipse.persistence.descriptors.ClassDescriptor; public class MyClass implements MyInterface<Object> { public void customize(ClassDescriptor descriptor) throws Exception { } } 6. Set the Customer Class on the entity to be the newly created class. During validation, ASTTool.findTypeInHierarchy() is called and ITypeBinding.getQualifiedName() will return MyInterface<java.lang.Object> instead of MyInterface.