Community
Participate
Working Groups
The default value for nillable on the @XmlElement annotation is false. If you wanted to make all the fields/properties mapped to XML elements nillable you would need to annotate every one. To make this easier we could provide an extension to set a package level default.
I am working on the enhancement.
Created attachment 245337 [details] Patch fix for this bug. Introduced new annotation XmlElementNillable with ElementType.TYPE and ElementType.PACKAGE targets. Annotation with ElementType.TYPE overrides annotation with ElementType.PACKAGE. I have also extended annotation XmlNullPolicy to target ElementType.TYPE and ElementType.PACKAGE. I think it makes sense and its purpose and behavior is different than XmlElementNillable annotation. Purpose of XmlElementNillable is to extend standard XmlElement annotation with targets ElementType.TYPE and ElementType.PACKAGE. New xsd schema eclipselink_oxm_2.6.xsd introduced, which contains new xml elements xml-element-nillable and xml-null-policy.
Created attachment 245338 [details] same patch rebased against master with CRLF fix This is the same patch as before, but it is created against current master. It also fixes CRLF issues. But is much bigger.
testBeanValidation Error Unable to create a Configuration, because no Bean Validation provider could be found. Add a provider like Hibernate Validator (RI) to your classpath. javax.validation.ValidationException: Unable to create a Configuration, because no Bean Validation provider could be found. Add a provider like Hibernate Validator (RI) to your classpath. at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:271) at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:110) at org.eclipse.persistence.testing.jaxb.beanvalidation.BeanValidationRuntimeTestCase.setUp(BeanValidationRuntimeTestCase.java:215) Nevim jestli je to nejaky starsi problem, ale tehle test mi neprosel.
Oops, 'Nevim jestli je to nejaky starsi problem, ale tehle test mi neprosel.' -> 'I'm not sure if this is some older issue but this test did not passed.'
Created attachment 245348 [details] javadocs Added javadocs for XmlElementNillable annotation and for corresponding tests.
Created attachment 245382 [details] rebased against new master rebased against new master
Created attachment 245384 [details] fixed CRLF fixed CRLF
Pushing into master: http://git.eclipse.org/c/eclipselink/eclipselink.runtime.git/commit/?id=306056b9313a2241bbd68341b2910a09466f9e88
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink