Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327608 - Externalized Metadata - Unnecessary Classes Processed
Summary: Externalized Metadata - Unnecessary Classes Processed
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-12 15:57 EDT by Blaise Doughan CLA
Modified: 2022-06-09 10:18 EDT (History)
1 user (show)

See Also:


Attachments
sample projects that demonstrate the problem (14.91 KB, application/zip)
2010-10-13 04:35 EDT, Tom Pasierb CLA
no flags Details
Proposed Fix (11.15 KB, patch)
2010-10-13 16:49 EDT, Matt MacIvor CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Blaise Doughan CLA 2010-10-12 15:57:02 EDT
When externalized metadata is used it is possible that extra classes are unecessarily processed.

For example:

When processing annotated classes:

    public class Container {

        @XmlJavaTypeAdapter(adapters.UnmappableAdapter.class)
        private Unmappable containerProperty;

    }

We do not process the Unmappable class.  If however the XmlJavaTypeAdapter is specified in XML we will process the Unmappable class.  If the Unmappable class is missing a default constructor MOXy will throw an exception.
Comment 1 Tom Pasierb CLA 2010-10-13 04:35:44 EDT
Created attachment 180740 [details]
sample projects that demonstrate the problem

one project is the jaxb-ri project that "works fine" and the other one (jaxb-moxy) is using moxy and externalized metadata.

The problem occurs irrespective of the placement of the XmlJavaTypeAdapter (the unmappable class itself, the package where the unamppable type is used or the unmappable property).
Comment 2 Matt MacIvor CLA 2010-10-13 16:49:45 EDT
Created attachment 180829 [details]
Proposed Fix
Comment 3 Matt MacIvor CLA 2010-10-26 16:35:18 EDT
Attached patch checked into SVN in trunk. 

Leaving bug open pending backport into 2.1.3 stream.
Comment 4 Blaise Doughan CLA 2011-01-10 13:51:39 EST
The decision was made to not backport this fix to 2.1.3.
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:18:56 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink