Skip to content

fix: preserve equal rows from patches - #233

Merged
wumpz merged 1 commit into
java-diff-utils:masterfrom
Chanakan5591:fix/equal-delta-diff-rows
Sep 18, 2026
Merged

wumpz merged 1 commit into
java-diff-utils:masterfrom
Chanakan5591:fix/equal-delta-diff-rows

Conversation

@Chanakan5591

Copy link
Copy Markdown
Contributor

Problem

DiffRowGenerator.generateDiffRows(List, Patch) incorrectly handles
EqualDelta instances as changes.

When a patch contains equal parts, such as a patch generated with
includeEqualParts = true, unchanged rows are returned with
DiffRow.Tag.CHANGE instead of DiffRow.Tag.EQUAL.

Changes

  • Handle EqualDelta explicitly as an equal row.
  • Preserve configured equality processing for unchanged lines.
  • Add regression tests for both inline and non-inline diff modes.

Functional Validation

  • Ran mvn -pl java-diff-utils test
  • 149 tests passed
  • 0 failures
  • 0 errors
  • 3 pre-existing unrelated tests skipped
  • Checkstyle passed with 0 violations

This change does not modify any public API.

@wumpz
wumpz merged commit 6e0ec1e into java-diff-utils:master Sep 18, 2026
4 checks passed
@wumpz

wumpz commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Thx for the PR

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants