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

Bug 340778

Summary: Bug with @XmlTransient on property
Product: z_Archived Reporter: Blaise Doughan <blaise.doughan>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipselink.oxm-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
MOXy - Test Cases
none
MOXy - Test Cases
none
MOXy - Test Cases
none
MOXy - Fix none

Description Blaise Doughan CLA 2011-03-23 11:43:28 EDT
@XmlTransient is being ignored in this example:

import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

@XmlRootElement
public class Customer {

    private String firstName;

    private String lastName;

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    @XmlTransient
    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

}
Comment 1 Blaise Doughan CLA 2011-03-24 13:51:28 EDT
Created attachment 191847 [details]
MOXy - Test Cases
Comment 2 Blaise Doughan CLA 2011-03-24 13:53:47 EDT
Created attachment 191848 [details]
MOXy - Test Cases
Comment 3 Blaise Doughan CLA 2011-03-24 13:54:29 EDT
Created attachment 191849 [details]
MOXy - Test Cases
Comment 4 Blaise Doughan CLA 2011-03-24 13:57:52 EDT
Created attachment 191850 [details]
MOXy - Fix
Comment 5 Blaise Doughan CLA 2011-03-25 09:34:45 EDT
Fix checked into trunk at rev: 9172

Code reviewed by:  Matt MacIvor

Fix description:
In AnnotationsProcessor check for @XmlTransient annotations on a property when checking if the property was annotated.
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:27:08 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink