javaee / jaxb2-commons

JAXB Implementation project has been contributed to Eclipse Foundation. This repository is for legacy review only. Please refer to the Eclipse EE4J Metro project for the very latest
https://eclipse-ee4j.github.io/jaxb-ri/
Other
17 stars 15 forks source link

Improve value-constructor plugin not to set List properties to null #14

Open glassfishrobot opened 16 years ago

glassfishrobot commented 16 years ago

Currently if the parameter in the constructor is null, it is still assigned to the related property.

In a patch to collection-setter-injector plugin (issue 13), list properties can now be instantiated with an empty ArrayList.

Thus, it would be nice if the value-constructor does not replace the default instantiated empty list with null if the it is passed in the constructor's parameters.

Environment

Operating System: All Platform: All

Affected Versions

[current]

glassfishrobot commented 16 years ago

Reported by ozgwei

glassfishrobot commented 16 years ago

ozgwei said: Created an attachment (id=7) A patch that does not perform the assignment if the parameter is null for a List property

glassfishrobot commented 16 years ago

ozgwei said: The attached patch includes the patch I previously submitted for issue 11.

glassfishrobot commented 16 years ago

ozgwei said: This issue itself does not depend on issue 11. However, the patch I have just attached is built on top of the patch I submitted for issue 11. So the patch itself depends on issue 11. Just to clarify the dependency.

Alex Wei

glassfishrobot commented 15 years ago

kohsuke said: Looking at the code, it doesn't look like Lexi is the owner of the plugin.

Would you like me to set you up with the commit access so that you can commit this change? Maybe the original author has moved on, and I don't want your patch to be in the limbo forever.

If the author does have a problem with your change, we could still roll back your change later.

glassfishrobot commented 16 years ago

File: value-constructor-patch-20081018-2047.txt Attached By: ozgwei

glassfishrobot commented 16 years ago

Issue-Links: depends on JAXB2_COMMONS-11

glassfishrobot commented 16 years ago

Was assigned to lexi

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA JAXB2_COMMONS-14