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

UnifiedDiffParserException on apparently sane file (2nd variant) #107

Closed
Assignees
wumpz
Labels
@moio

Description

@moio

Describe the bug
UnifiedDiffReader.parseUnifiedDiff throws UnifiedDiffParserException on a patch which apparently looks good:

https://raw.githubusercontent.com/bazelbuild/bazel/master/third_party/aws-sdk-auth-lite/patches-vs-1.11.297/01-bazel-strip-unused.patch

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp