Title: UnifiedDiffParserException on apparently sane file (2nd variant) · Issue #107 · java-diff-utils/java-diff-utils · GitHub
Open Graph Title: UnifiedDiffParserException on apparently sane file (2nd variant) · Issue #107 · java-diff-utils/java-diff-utils
X Title: UnifiedDiffParserException on apparently sane file (2nd variant) · Issue #107 · java-diff-utils/java-diff-utils
Description: 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-...
Open Graph Description: Describe the bug UnifiedDiffReader.parseUnifiedDiff throws UnifiedDiffParserException on a patch which apparently looks good: https://raw.githubusercontent.com/bazelbuild/bazel/master/third_party/a...
X Description: Describe the bug UnifiedDiffReader.parseUnifiedDiff throws UnifiedDiffParserException on a patch which apparently looks good: https://raw.githubusercontent.com/bazelbuild/bazel/master/third_party/a...
Opengraph URL: https://github.com/java-diff-utils/java-diff-utils/issues/107
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"UnifiedDiffParserException on apparently sane file (2nd variant)","articleBody":"**Describe the bug**\r\n`UnifiedDiffReader.parseUnifiedDiff` throws UnifiedDiffParserException on a patch which apparently looks good: \r\n\r\nhttps://raw.githubusercontent.com/bazelbuild/bazel/master/third_party/aws-sdk-auth-lite/patches-vs-1.11.297/01-bazel-strip-unused.patch\r\n\r\n**To Reproduce**\r\nRun this program:\r\n\r\n```java\r\nString patch = new Scanner(new URL(\r\n \"https://raw.githubusercontent.com/bazelbuild/bazel/master/third_party/aws-sdk-auth-lite/patches-vs-1.11.297/01-bazel-strip-unused.patch\"\r\n).openStream(), \"UTF-8\").useDelimiter(\"\\\\A\").next();\r\n\r\nUnifiedDiffReader.parseUnifiedDiff(new StringBufferInputStream(patch));\r\n```\r\n\r\n**Expected behavior**\r\n\r\nNo Exceptions.\r\n\r\n**Actual behavior**\r\n\r\nDec 14, 2020 9:49:46 PM com.github.difflib.unifieddiff.UnifiedDiffReader processLine\r\nWARNING: \u003e\u003e\u003e no rule matched \\ No newline at end of file\r\nException in thread \"main\" com.github.difflib.unifieddiff.UnifiedDiffParserException: expected file start line not found\r\n\tat com.github.difflib.unifieddiff.UnifiedDiffReader.parse(UnifiedDiffReader.java:95)\r\n\tat com.github.difflib.unifieddiff.UnifiedDiffReader.parseUnifiedDiff(UnifiedDiffReader.java:146)\r\n...\r\n\r\n**System**\r\n - Java version: openjdk-11\r\n - Version: 4.9\r\n\r\n**Notes**\r\n\r\n:wave: 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.","author":{"url":"https://github.com/moio","@type":"Person","name":"moio"},"datePublished":"2020-12-14T20:51:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":13},"url":"https://github.com/107/java-diff-utils/issues/107"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f6c3ce21-c859-baf6-0352-08358219209f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A6C2:111C42:64EDFA:87A839:69697410 |
| html-safe-nonce | e43da24676b71d111a98a0bf12f1b0e74d350d1831070acc1f18d8844c3f5818 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNkMyOjExMUM0Mjo2NEVERkE6ODdBODM5OjY5Njk3NDEwIiwidmlzaXRvcl9pZCI6IjY4NDI0MzY1MzQxNzA5MDc2NjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9b80c5eee77f4c4866b5bb92e7501a4eb28d3266abd9e75b1f466db3297a4543 |
| hovercard-subject-tag | issue:766916238 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/java-diff-utils/java-diff-utils/107/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0b9c10ccb1eb19034ff5f5aea100410251d448d62a3d03084bd097ec7bb510f2/java-diff-utils/java-diff-utils/issues/107 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0b9c10ccb1eb19034ff5f5aea100410251d448d62a3d03084bd097ec7bb510f2/java-diff-utils/java-diff-utils/issues/107 |
| og:image:alt | Describe the bug UnifiedDiffReader.parseUnifiedDiff throws UnifiedDiffParserException on a patch which apparently looks good: https://raw.githubusercontent.com/bazelbuild/bazel/master/third_party/a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | moio |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6f193beb8ff08443adc07685d75302ab8aaf0a135f6e251c3ff3112c8deb881 |
| turbo-cache-control | no-preview |
| go-import | github.com/java-diff-utils/java-diff-utils git https://github.com/java-diff-utils/java-diff-utils.git |
| octolytics-dimension-user_id | 40540835 |
| octolytics-dimension-user_login | java-diff-utils |
| octolytics-dimension-repository_id | 86663812 |
| octolytics-dimension-repository_nwo | java-diff-utils/java-diff-utils |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 86663812 |
| octolytics-dimension-repository_network_root_nwo | java-diff-utils/java-diff-utils |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 212e3e3d3298bf5b313830edfd2399e869f7ea76 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width