Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 325479

Summary: Please consider enhancing DynamicType#getPropertyType to always return the correct type
Product: z_Archived Reporter: Frank Schwarz <fs5>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Frank Schwarz CLA 2010-09-16 11:03:33 EDT
Build Identifier: Trunk

DynamicType provides a method "getPropertyType(String propertyName)" that will return the type of the stated property. This method fails (i.e. returns "null") if the property is not of a simple type. For example, it will fail if the property is based on a one-to-one mapping.


I would like to suggest to not return "Class<?>" from this method but "java.lang.reflect.Type". This way, even "java.util.List<MyModelClass>" could be returned by this method (as a java.lang.reflect.ParameterizedType)

N.B.: java.lang.reflect.Type is a superinterface of java.lang.Class<E>.
Alas, this change will not maintain byte-code compatibility of the EL jar.

Reproducible: Always
Comment 1 Eclipse Webmaster CLA 2022-06-09 10:35:25 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink