← 输入框|github.com|刷新
Skip to content

Propagate I/O failures from UnifiedDiffWriter - #234

Merged
wumpz merged 2 commits into
java-diff-utils:masterfrom
jakezwang:fix/propagate-writer-errors
Oct 9, 2026
Merged

wumpz merged 2 commits into
java-diff-utils:masterfrom
jakezwang:fix/propagate-writer-errors

Conversation

@jakezwang

Copy link
Copy Markdown
Contributor

The Writer overload logs and swallows IOException, allowing a partially written diff to look successful to the caller.

Bridge the exception through the Consumer overload with UncheckedIOException, then rethrow the original IOException. Regression tests fail during header, body and trailer output, including newline writes, and verify that writing stops immediately.

Validation: mvn -B -ntp clean package passes on JDK 8 and 17, including formatting, Checkstyle, both modules and Javadoc (156 tests, 3 skipped). All four new cases fail before the fix.

@wumpz
wumpz merged commit 1b449db into java-diff-utils:master Oct 9, 2026
4 checks passed
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