Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

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

Open
glassfishrobot opened this issue Oct 18, 2008 · 9 comments

Comments

@glassfishrobot
Copy link
Contributor

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
Copy link
Contributor Author

Reported by ozgwei

@glassfishrobot
Copy link
Contributor Author

Issue-Links:
depends on
JAXB2_COMMONS-11

@glassfishrobot
Copy link
Contributor Author

Was assigned to lexi

@glassfishrobot
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@glassfishrobot
Copy link
Contributor Author

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

@glassfishrobot
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant