Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork201
Added ability to apply patch to existing list inplace#152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Added ability to apply patch to existing list inplace#152
Uh oh!
There was an error while loading.Please reload this page.
Conversation
But as I understand it, you did not add but change the existing behaviour, right? |
No, i didn't change the existing behavior. I extracted the core functionality to make it accessible from the outside, that's why it looks changed at first. |
Uh oh!
There was an error while loading.Please reload this page.
Motivation
I'm using java-diff-utils to update lists in JPA models from a DTOs. As Hibernate uses proxies and records any removal/add/swap, but has it's problems when using clear/addAll, this is the only option to make patching my lists work.
In older versions i accessed AbstractDelta's
applyTo
directly, but that fell away when it was made hidden in3075742.Changes
I added a the methods
applyToExisting
and it's oppositerestoreToExisting
toPatch
, to make it possible to update lists in-place and updated JavaDoc accordingly.Minor improvements
I corrected a typo in the method-name
verifyAntApplyTo
->verifyAndApplyTo