Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325479 - Please consider enhancing DynamicType#getPropertyType to always return the correct type
Summary: Please consider enhancing DynamicType#getPropertyType to always return the co...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-16 11:03 EDT by Frank Schwarz CLA
Modified: 2022-06-09 10:35 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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