We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug com.github.difflib.unifieddiff.UnifiedDiffReader#parseUnifiedDiff fails when the diff contains changes with Binaries.
com.github.difflib.unifieddiff.UnifiedDiffReader#parseUnifiedDiff
To Reproduce
problem_diff_binary.diff
diff --git a/some-image.png b/some-image.png new file mode 100644 index 0000000..bc3b5b4 Binary files /dev/null and b/some-image.png differ
@Test public void testParseBinary() throws IOException { UnifiedDiff diff = UnifiedDiffReader.parseUnifiedDiff( UnifiedDiffReaderTest.class.getResourceAsStream("problem_diff_binary.diff")); assertEquals(1, 1); }
By doing so, it returns an exception:
com.github.difflib.unifieddiff.UnifiedDiffReader processLine WARNING: >>> no rule matched Binary files /dev/null and b/some-image.png differ
Expected behavior I would expect not to throw an exception, and that it would handle the Binary file entry as an UnifiedDiffFile
UnifiedDiffFile
System openjdk 17 2021-09-14 OpenJDK Runtime Environment Temurin-17+35 (build 17+35) OpenJDK 64-Bit Server VM Temurin-17+35 (build 17+35, mixed mode, sharing)
The text was updated successfully, but these errors were encountered:
Fixes java-diff-utils#182 by parsing diffs with 'Binary files'
fbc62aa
54324fb
No branches or pull requests
Describe the bug
com.github.difflib.unifieddiff.UnifiedDiffReader#parseUnifiedDiff
fails when the diff contains changes with Binaries.To Reproduce
problem_diff_binary.diff
with:com.github.difflib.unifieddiff.UnifiedDiffReader#parseUnifiedDiff
like a new test:By doing so, it returns an exception:
Expected behavior
I would expect not to throw an exception, and that it would handle the Binary file entry as an
UnifiedDiffFile
System
openjdk 17 2021-09-14
OpenJDK Runtime Environment Temurin-17+35 (build 17+35)
OpenJDK 64-Bit Server VM Temurin-17+35 (build 17+35, mixed mode, sharing)
The text was updated successfully, but these errors were encountered: