Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328079 - Problem with XmlAdapter<String, List<Test>>
Summary: Problem with XmlAdapter<String, List<Test>>
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: Blaise Doughan CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-18 17:08 EDT by Blaise Doughan CLA
Modified: 2022-06-09 10:02 EDT (History)
0 users

See Also:


Attachments
MOXy - Fix (553 bytes, patch)
2010-10-18 17:13 EDT, Blaise Doughan CLA
no flags Details | Diff
MOXy - Test Cases (9.62 KB, patch)
2010-10-20 11:16 EDT, Blaise Doughan CLA
no flags Details | Diff
MOXy - Fix (656 bytes, patch)
2010-10-20 11:17 EDT, Blaise Doughan 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-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