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

support merging inline deltas split by whitespace or a minor equality (#168)#191

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 2 commits intojava-diff-utils:masterfromepictecch:master
Feb 5, 2025

Conversation

epictecch
Copy link
Contributor

No description provided.

@epictecch
Copy link
ContributorAuthor

@wumpz: Could you please provide any feedback regarding this pull request that would solve#168?
Is this PR in line with other concepts of the library?

Copy link
Collaborator

@wumpzwumpz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Your PR looks good. Please change the default behaviour. And thx for using java-diff-utils.

List<AbstractDelta<String>> inlineDeltas = DiffUtils.diff(origList, revList, equalizer).getDeltas();
List<AbstractDelta<String>> originalInlineDeltas = DiffUtils.diff(origList, revList, equalizer)
.getDeltas();
List<AbstractDelta<String>> inlineDeltas = inlineDeltaMerger
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Please change it so that the default configuration without a merger leaves the functionality as it was, so no default merger.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks for your review and feedback.
The default behaviour is not changed by my pull request. By default, theinlineDeltaMerger is set toDEFAULT_INLINE_DELTA_MERGER which does not change the deltas. It just returns the original deltas.
By using theDEFAULT_INLINE_DELTA_MERGER, we can omit having null-checks on theinlineDeltaMerger and the code part that you've quoted stays cleaner.
Mainly, I used this approach compared to a null-check as it seems to be more in line with the other mechanisms. E.g. having aDEFAULT_EQUALIZER instead of having if-else cascades where Object::equals is used in case theequalizer property is null.

Please advise how to continue. Shall I:

  • leave my original code unchanged
  • add a comment above your quoted code part that explains that the default-delta-merger does not merge any deltas
  • Remove theDEFAULT_INLINE_DELTA_MERGER and checking theinlineDeltaMerger for null

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@wumpz: Please advise how to continue.

@github-actionsGitHub Actions
Copy link

Stale pull request message

@epictecch
Copy link
ContributorAuthor

@wumpz: Is there anything I can do to help you decide on how to continue?

@wumpzwumpz merged commitb5b7dac intojava-diff-utils:masterFeb 5, 2025
1 of 4 checks passed
wumpz added a commit that referenced this pull requestFeb 5, 2025
wumpz added a commit that referenced this pull requestFeb 5, 2025
@wumpz
Copy link
Collaborator

I merged your changes. How did you test it? I assume you did not use the maven build. I had to change multiple methods that were not in Java 8.

@epictecch
Copy link
ContributorAuthor

Thank you very much!
To be honest, I don't remember anymore how I built the project. But it seems very likely that I didn't realize that the library should be Java 8 compatible.
I tested it manually and by executing the existing and newly added unit tests.

@wumpz
Copy link
Collaborator

However, thx for your contribution.
Sorry for beeing so slow. At the moment there is a time issue. So I have not so much time for my libs.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@wumpzwumpzwumpz requested changes

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
@epictecch@wumpz

[8]ページ先頭

©2009-2025 Movatter.jp