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

Bug 328079

Summary: Problem with XmlAdapter<String, List<Test>>
Product: z_Archived Reporter: Blaise Doughan <blaise.doughan>
Component: EclipselinkAssignee: Blaise Doughan <blaise.doughan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
MOXy - Fix
none
MOXy - Test Cases
none
MOXy - Fix none

Description Blaise Doughan CLA 2010-10-18 17:08:35 EDT
For the following model class:

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

@XmlRootElement
public class Root {

    private List<Test> tests = new ArrayList<Test>();

    @XmlJavaTypeAdapter(ListXmlAdapter.class)
    public List<Test> getTests() {
        return tests;
    }

    public void setTests(List<Test> tests) {
        this.tests = tests;
    }
    
}

We are creating an XMLCompositeObjectMapping for the tests property instead of an XMLDirectMapping.
Comment 1 Blaise Doughan CLA 2010-10-18 17:13:27 EDT
Created attachment 181134 [details]
MOXy - Fix
Comment 2 Blaise Doughan CLA 2010-10-20 11:16:24 EDT
Created attachment 181299 [details]
MOXy - Test Cases
Comment 3 Blaise Doughan CLA 2010-10-20 11:17:05 EDT
Created attachment 181300 [details]
MOXy - Fix
Comment 4 Blaise Doughan CLA 2010-10-21 11:53:53 EDT
Fix checked into trunk at rev:  8381

Fix by:  Matt MacIvor
Reviewed and committed by:  Blaise Doughan
Comment 5 Blaise Doughan CLA 2011-01-10 13:54:09 EST
Fixed as per above comments.
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:02:23 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink