Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325979 - XMLADAPTER RESULTS INCONSISTENT OBJECT IN RUNTIME.
Summary: XMLADAPTER RESULTS INCONSISTENT OBJECT IN RUNTIME.
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-09-22 11:29 EDT by Matt MacIvor CLA
Modified: 2022-06-09 10:29 EDT (History)
0 users

See Also:


Attachments
proposed fix and test case (10.41 KB, patch)
2010-09-22 11:53 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 Matt MacIvor CLA 2010-09-22 11:29:05 EDT
Assuming a class has a java attribute of type List<String> and an XmlJavaTypeAdapter annotation that converts that List<String> to a single String on marshal, EclipseLink JAXB will unmarshal the value incorrectly.

This is because during processing the type isn't being correctly set on the property due to an incorrect assumption that an XmlJavaTypeAdapter on a Collection property is intended to always only apply to the elements of the collection and not the collection as a whole. This should be changed to be dependent value type of the Adapter.
Comment 1 Matt MacIvor CLA 2010-09-22 11:53:34 EDT
Created attachment 179389 [details]
proposed fix and test case
Comment 2 Matt MacIvor CLA 2010-09-23 14:05:11 EDT
Fix checked into SVN in the 2.2 and 2.1 streams
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:29:03 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink