Skip to content

Fix #8233: write the NUL separator as an escape so the sources stay text - #8235

Merged
hansva merged 1 commit into
apache:mainfrom
fskorgen:fix/nul-byte-in-java-sources
Sep 2, 2026
Merged

Fix #8233: write the NUL separator as an escape so the sources stay text#8235
hansva merged 1 commit into
apache:mainfrom
fskorgen:fix/nul-byte-in-java-sources

Conversation

@fskorgen

@fskorgen fskorgen commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Two Java files use a NUL character as a separator, written as a real byte in the source. Git treats those files as binary and skips line-ending normalization, so on Windows a build rewrites them with CRLF and they appear as a ~4200-line change with no content change.

This writes the separator as the escape "\0" instead. Same character at runtime, and both files become normal text files for Git.

Fixes #8233

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Run mvn clean install apache-rat:check to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • If you have a group of commits related to the same change, please squash your commits into one and force push your branch using git rebase -i.
  • Mention the appropriate issue in your description (for example: addresses #123), if applicable.

To make clear that you license your contribution under the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@hansva
hansva merged commit 3d676fb into apache:main Sep 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Two Java sources contain a literal NUL byte, so Git treats them as binary

2 participants