Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
wumpz merged 3 commits intojava-diff-utils:masterfromandre161292:feature/apply-to-original-collection
Sep 1, 2022
Merged

Added ability to apply patch to existing list inplace#152

wumpz merged 3 commits intojava-diff-utils:masterfromandre161292:feature/apply-to-original-collection
Sep 1, 2022

Conversation

andre161292
Copy link
Contributor

@andre161292andre161292 commentedJul 28, 2022
edited
Loading

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'sapplyTo directly, but that fell away when it was made hidden in3075742.

Changes

I added a the methodsapplyToExisting 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-nameverifyAntApplyTo ->verifyAndApplyTo

@wumpz
Copy link
Collaborator

But as I understand it, you did not add but change the existing behaviour, right?

@andre161292
Copy link
ContributorAuthor

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.

@wumpzwumpz merged commit7d0fd54 intojava-diff-utils:masterSep 1, 2022
@andre161292andre161292 deleted the feature/apply-to-original-collection branchSeptember 1, 2022 21:25
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@andre161292@wumpz

[8]ページ先頭

©2009-2025 Movatter.jp