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/06/28 21:31:06 UTC

(commons-compress) branch master updated (221012574 -> 19400fce9)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git


    from 221012574 Sort members
     new 1b39c0ad2 Remove unnecessary keyword
     new 5d3001413 Remove unnecessary keyword
     new 23f7d5daf Exit loop sooner
     new 94025ac95 Remove unnecessary keyword
     new 7264cf8d8 Remove unnecessary keyword
     new 5a16ad0b1 Use final
     new 19400fce9 Use final

The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java | 2 +-
 .../org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java  | 4 ++--
 .../commons/compress/archivers/zip/AbstractUnicodeExtraField.java     | 2 +-
 src/main/java/org/apache/commons/compress/compressors/bzip2/CRC.java  | 2 +-
 .../java/org/apache/commons/compress/harmony/unpack200/Archive.java   | 1 +
 .../org/apache/commons/compress/harmony/unpack200/bytecode/CPRef.java | 2 +-
 .../compress/archivers/zip/FileRandomAccessOutputStreamTest.java      | 4 ++--
 7 files changed, 9 insertions(+), 8 deletions(-)


(commons-compress) 06/07: Use final

Posted by gg...@apache.org.
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 5a16ad0b161e1a6e22dfd6f7f72f1bb32f77c335
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 28 17:22:05 2024 -0400

    Use final
---
 src/main/java/org/apache/commons/compress/compressors/bzip2/CRC.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/compress/compressors/bzip2/CRC.java b/src/main/java/org/apache/commons/compress/compressors/bzip2/CRC.java
index 93dcdbdf1..349f67247 100644
--- a/src/main/java/org/apache/commons/compress/compressors/bzip2/CRC.java
+++ b/src/main/java/org/apache/commons/compress/compressors/bzip2/CRC.java
@@ -57,7 +57,7 @@ final class CRC {
     }
 
     private int compute(final int baseCrc, final int inCh) {
-        int index = baseCrc >> 24 ^ inCh;
+        final int index = baseCrc >> 24 ^ inCh;
         return baseCrc << 8 ^ CRC32_TABLE[index < 0 ? index + 256 : index];
     }
 


(commons-compress) 04/07: Remove unnecessary keyword

Posted by gg...@apache.org.
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 94025ac95e4650203cc3f77ad83408b5d25f51d9
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 28 17:21:48 2024 -0400

    Remove unnecessary keyword
---
 .../org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java
index 164e3de60..7a91d531c 100644
--- a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java
@@ -373,7 +373,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry {
      */
     public CpioArchiveEntry(final short format, final String name, final long size) {
         this(format, name);
-        this.setSize(size);
+        setSize(size);
     }
 
     /**
@@ -393,7 +393,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry {
      */
     public CpioArchiveEntry(final String name, final long size) {
         this(name);
-        this.setSize(size);
+        setSize(size);
     }
 
     /**


(commons-compress) 01/07: Remove unnecessary keyword

Posted by gg...@apache.org.
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 1b39c0ad2ef9937cd20da16647f5b98c960a9357
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 28 17:21:04 2024 -0400

    Remove unnecessary keyword
---
 .../commons/compress/archivers/zip/AbstractUnicodeExtraField.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/AbstractUnicodeExtraField.java b/src/main/java/org/apache/commons/compress/archivers/zip/AbstractUnicodeExtraField.java
index ed427410d..1b9335164 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/AbstractUnicodeExtraField.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/AbstractUnicodeExtraField.java
@@ -80,7 +80,7 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField {
     @Override
     public byte[] getCentralDirectoryData() {
         if (data == null) {
-            this.assembleData();
+            assembleData();
         }
         byte[] b = null;
         if (data != null) {


(commons-compress) 02/07: Remove unnecessary keyword

Posted by gg...@apache.org.
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 5d3001413b56f778bd8554b9aaab58d9ccdebf9f
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 28 17:21:11 2024 -0400

    Remove unnecessary keyword
---
 .../java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java
index 6c92f9540..be98132a1 100644
--- a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java
@@ -198,7 +198,7 @@ public class ArArchiveEntry implements ArchiveEntry {
 
     @Override
     public long getSize() {
-        return this.getLength();
+        return getLength();
     }
 
     /**


(commons-compress) 03/07: Exit loop sooner

Posted by gg...@apache.org.
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 23f7d5daf87b184ab4108a581602a802cf50ca1b
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 28 17:21:22 2024 -0400

    Exit loop sooner
---
 src/main/java/org/apache/commons/compress/harmony/unpack200/Archive.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/main/java/org/apache/commons/compress/harmony/unpack200/Archive.java b/src/main/java/org/apache/commons/compress/harmony/unpack200/Archive.java
index d134a656d..6723e4a16 100644
--- a/src/main/java/org/apache/commons/compress/harmony/unpack200/Archive.java
+++ b/src/main/java/org/apache/commons/compress/harmony/unpack200/Archive.java
@@ -180,6 +180,7 @@ public class Archive {
             for (int m = 0; m < MAGIC.length; m++) {
                 if (word[m] != MAGIC[m]) {
                     compressedWithE0 = true;
+                    break;
                 }
             }
             inputStream.reset();


(commons-compress) 05/07: Remove unnecessary keyword

Posted by gg...@apache.org.
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 7264cf8d8f627024724969c87b0db498aa2bd54b
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 28 17:21:56 2024 -0400

    Remove unnecessary keyword
---
 .../org/apache/commons/compress/harmony/unpack200/bytecode/CPRef.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/CPRef.java b/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/CPRef.java
index dbf572ef1..1752e8655 100644
--- a/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/CPRef.java
+++ b/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/CPRef.java
@@ -59,7 +59,7 @@ public abstract class CPRef extends ConstantPoolEntry {
         if (getClass() != obj.getClass()) {
             return false;
         }
-        if (this.hashCode() != obj.hashCode()) {
+        if (hashCode() != obj.hashCode()) {
             return false;
         }
         final CPRef other = (CPRef) obj;


(commons-compress) 07/07: Use final

Posted by gg...@apache.org.
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 19400fce967e206ab1726dcc0f7e7f06df0d9e85
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 28 17:22:15 2024 -0400

    Use final
---
 .../compress/archivers/zip/FileRandomAccessOutputStreamTest.java      | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/FileRandomAccessOutputStreamTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/FileRandomAccessOutputStreamTest.java
index 1c563c250..3021a95c5 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/FileRandomAccessOutputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/FileRandomAccessOutputStreamTest.java
@@ -60,8 +60,8 @@ public class FileRandomAccessOutputStreamTest extends AbstractTempDirTest {
 
     @Test
     public void testWrite() throws IOException {
-        FileChannel channel = mock(FileChannel.class);
-        FileRandomAccessOutputStream stream = new FileRandomAccessOutputStream(channel);
+        final FileChannel channel = mock(FileChannel.class);
+        final FileRandomAccessOutputStream stream = new FileRandomAccessOutputStream(channel);
         when(channel.write((ByteBuffer) any())).thenAnswer(answer -> {
             ((ByteBuffer) answer.getArgument(0)).position(5);
             return 5;