Skip to content

Commit

Permalink
Use final
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Sep 11, 2024
1 parent e9eec1c commit fed2922
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ private void closeEntry(final boolean actuallyNeedsZip64, final boolean phased)
entry = null;
}

private void copyFromZipInputStream(final InputStream src, boolean phased) throws IOException {
private void copyFromZipInputStream(final InputStream src, final boolean phased) throws IOException {
if (entry == null) {
throw new IllegalStateException("No current entry");
}
Expand Down Expand Up @@ -1249,11 +1249,12 @@ private void rewriteSizesAndCrc(final boolean actuallyNeedsZip64) throws IOExcep
randomStream.writeFully(ZipLong.getBytes(entry.entry.getCrc()), position); position += ZipConstants.WORD;
if (!hasZip64Extra(entry.entry) || !actuallyNeedsZip64) {
randomStream.writeFully(ZipLong.getBytes(entry.entry.getCompressedSize()), position); position += ZipConstants.WORD;
randomStream.writeFully(ZipLong.getBytes(entry.entry.getSize()), position); position += ZipConstants.WORD;
randomStream.writeFully(ZipLong.getBytes(entry.entry.getSize()), position);
} else {
randomStream.writeFully(ZipLong.ZIP64_MAGIC.getBytes(), position); position += ZipConstants.WORD;
randomStream.writeFully(ZipLong.ZIP64_MAGIC.getBytes(), position); position += ZipConstants.WORD;
randomStream.writeFully(ZipLong.ZIP64_MAGIC.getBytes(), position);
}
position += ZipConstants.WORD;

if (hasZip64Extra(entry.entry)) {
final ByteBuffer name = getName(entry.entry);
Expand Down

0 comments on commit fed2922

Please sign in to comment.