| Summary: | Enhancement: Provide a means to default the nillable setting for all @XmlElement | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Blaise Doughan <blaise.doughan> | ||||||||||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||||
| Severity: | enhancement | ||||||||||||||
| Priority: | P3 | CC: | snsekar, tomas.kraus, voytoo | ||||||||||||
| Version: | unspecified | ||||||||||||||
| Target Milestone: | --- | ||||||||||||||
| Hardware: | PC | ||||||||||||||
| OS: | Windows XP | ||||||||||||||
| URL: | http://stackoverflow.com/questions/8841221/can-you-change-the-default-value-of-the-nillable-attribute-in-jaxb | ||||||||||||||
| Whiteboard: | |||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Blaise Doughan
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 The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |