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

Bug 325979

Summary: XMLADAPTER RESULTS INCONSISTENT OBJECT IN RUNTIME.
Product: z_Archived Reporter: Matt MacIvor <matt.macivor>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
proposed fix and test case none

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