Bug 282290 - JPA: Refactor MappingAccessor.getMapKeyReferenceClass() try/catch with new isGeneric() function
Summary: JPA: Refactor MappingAccessor.getMapKeyReferenceClass() try/catch with new is...
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: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 266912
Blocks:
  Show dependency tree
 
Reported: 2009-07-02 10:12 EDT by Michael OBrien CLA
Modified: 2022-06-09 10:05 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael OBrien CLA 2009-07-02 10:12:33 EDT
>Issue:
In support of the JPA 2.0 Metamodel API, the Metadata API was modified.
In the following part of bug# 266912 , a modification was put in for MappedSuperclass descriptors as a workaround for inherited parameterized generics types so that we default to Void.class for any type "T" that is unresolvable.

We catch an expected ValidationException (by trying to classLoad the class) in this specific case and return a new MetadataClass around Void.class - instead of allowing the exception to proceed.

>see:
https://bugs.eclipse.org/bugs/attachment.cgi?id=140424&action=diff#jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/MappingAccessor.java_sec4

http://fisheye2.atlassian.com/browse/eclipselink/trunk/jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/MappingAccessor.java?r1=4525&r2=4587

>Solution:
The existing solution in MappingAccessor.getMapKeyReferenceClass():540 works.
However, we may want to investigate a better refactor of this method in the future that avoids a try catch block.
Preferably a new function like isGeneric() or isParameterizeGeneric()
Comment 1 Michael OBrien CLA 2009-11-23 00:02:37 EST
>This work has not been scheduled - moving off 2.0
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:05:25 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink