-
Notifications
You must be signed in to change notification settings - Fork 15
Improve collection-setter-injector plugin to eagerly initialize collection properties #13
Comments
Reported by ozgwei |
Was assigned to lexi |
ozgwei said: |
File: collection-setter-injector-patch.txt |
ozgwei said: Alex |
ozgwei said: |
File: collection-setter-injector-patch-20081015-1641.txt |
ozgwei said: |
lexi said: |
This issue was imported from java.net JIRA JAXB2_COMMONS-13 |
If the List implementation is the default java.util.ArrayList, it will be lazily
initialized.
This can cause a problem when using the EqualsBuilder.reflectionEquals(obj, obj)
method, as implemented by commons-lang-plugin, if the expected object holds a
null for a collection property while the actual object holds an empty ArrayList
simply because the getter method has been called, which has a side effect.
Note that the lazy initialization is implemented for performance reason.
Environment
Operating System: All
Platform: All
Affected Versions
[current]
The text was updated successfully, but these errors were encountered: