Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork209
Description
Describe the bugUnifiedDiffReader.parseUnifiedDiff throws UnifiedDiffParserException on a patch which apparently looks good:
To Reproduce
Run this program:
Stringpatch =newScanner(newURL("https://raw.githubusercontent.com/bazelbuild/bazel/master/third_party/aws-sdk-auth-lite/patches-vs-1.11.297/01-bazel-strip-unused.patch").openStream(),"UTF-8").useDelimiter("\\A").next();UnifiedDiffReader.parseUnifiedDiff(newStringBufferInputStream(patch));
Expected behavior
No Exceptions.
Actual behavior
Dec 14, 2020 9:49:46 PM com.github.difflib.unifieddiff.UnifiedDiffReader processLine
WARNING: >>> no rule matched \ No newline at end of file
Exception in thread "main" com.github.difflib.unifieddiff.UnifiedDiffParserException: expected file start line not found
at com.github.difflib.unifieddiff.UnifiedDiffReader.parse(UnifiedDiffReader.java:95)
at com.github.difflib.unifieddiff.UnifiedDiffReader.parseUnifiedDiff(UnifiedDiffReader.java:146)
...
System
- Java version: openjdk-11
- Version: 4.9
Notes
👋 java-diff-utils maintainers again! Here is another corner case I found. The patch comes from the Bazel project, so once again it's OK to include in tests.