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 784ea342ef6cb685dc9585ad9dd774838229e17d
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Tue Jun 4 08:24:39 2024 -0400

    Fix PMD UnusedFormalParameter in private method
---
 .../commons/compress/archivers/zip/ZipArchiveInputStream.java       | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
 
b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
index 500f32345..ab1e155c3 100644
--- 
a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
+++ 
b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
@@ -659,7 +659,7 @@ public class ZipArchiveInputStream extends 
ArchiveInputStream<ZipArchiveEntry> i
                 // archive.
                 if (!readFirstLocalFileHeader()) {
                     hitCentralDirectory = true;
-                    skipRemainderOfArchive(true);
+                    skipRemainderOfArchive();
                     return null;
                 }
             } else {
@@ -673,7 +673,7 @@ public class ZipArchiveInputStream extends 
ArchiveInputStream<ZipArchiveEntry> i
         if (!sig.equals(ZipLong.LFH_SIG)) {
             if (sig.equals(ZipLong.CFH_SIG) || sig.equals(ZipLong.AED_SIG) || 
isApkSigningBlock(lfhBuf)) {
                 hitCentralDirectory = true;
-                skipRemainderOfArchive(false);
+                skipRemainderOfArchive();
                 return null;
             }
             throw new ZipException(String.format("Unexpected record signature: 
0x%x", sig.getValue()));
@@ -1295,7 +1295,7 @@ public class ZipArchiveInputStream extends 
ArchiveInputStream<ZipArchiveEntry> i
     /**
      * Reads the stream until it find the "End of central directory record" 
and consumes it as well.
      */
-    private void skipRemainderOfArchive(final boolean read) throws IOException 
{
+    private void skipRemainderOfArchive() throws IOException {
         // skip over central directory. One LFH has been read too much
         // already. The calculation discounts file names and extra
         // data, so it will be too short.

Reply via email to