You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/09/11 23:27:31 UTC
(commons-compress) 10/10: Use final
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git
commit fed292231d61bd444afe84cb9715ddaca7cc4a2b
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Sep 11 19:27:15 2024 -0400
Use final
---
.../commons/compress/archivers/zip/ZipArchiveOutputStream.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
index 3bf24aca8..0849f2848 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
@@ -622,7 +622,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream<ZipArchiveEntry>
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");
}
@@ -1249,11 +1249,12 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream<ZipArchiveEntry>
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);