[MSHADE-417] Fix nul bytes appended to small files by NichtStudioCode · Pull Request #140 · apache/maven-shade-plugin (original) (raw)

A bug was introduced in c798d01 that causes shade to append null characters to small files of less than 4 bytes. This was caused by super.unread ignoring the length returned by super.read, assuming that every file is bigger than 4 bytes.

https://issues.apache.org/jira/projects/MSHADE/issues/MSHADE-417

Following this checklist to help us incorporate your
contribution quickly and easily:

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

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.