Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337721 - schema gen for XmlAccessType.PROPERTY does not include annotated fields
Summary: schema gen for XmlAccessType.PROPERTY does not include annotated fields
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: 2011-02-21 09:24 EST by Karen Butzke CLA
Modified: 2022-06-09 10:34 EDT (History)
2 users (show)

See Also:


Attachments
Code to demonstrate the issue (1.11 KB, application/x-zip-compressed)
2011-02-24 14:18 EST, Blaise Doughan CLA
no flags Details
propsed fix and tests (14.33 KB, patch)
2011-03-16 15:43 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 Karen Butzke CLA 2011-02-21 09:24:40 EST
Using the following class I generated a schema using MOXy and the fields 'aPrivateField' and 'aPublicField' were not generated into the schema even though they are annotated fields. 

package test.propertyaccess;

@XmlType
@XmlAccessorType(XmlAccessType.PROPERTY)
public class A {

	@XmlAttribute
	private int aPrivateField;
	@XmlAttribute
	public String aPublicField;

	public String getAPublicProperty() {
		return null;
	}
	public void setAPublicProperty(String name) {
		
	}
	
	private String getAPrivateProperty() {
		return null;
	}
	private void setAPrivateProperty(String name) {
		
	}
}
Comment 1 Blaise Doughan CLA 2011-02-24 14:18:21 EST
Created attachment 189729 [details]
Code to demonstrate the issue
Comment 2 Matt MacIvor CLA 2011-03-16 15:43:47 EDT
Created attachment 191341 [details]
propsed fix and tests
Comment 3 Matt MacIvor CLA 2011-03-17 10:53:29 EDT
Attached patch checked in to SVN
Reviewed by Blaise Doughan
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:34:17 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink