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 2023/03/13 12:33:31 UTC

[commons-compress] branch master updated (d8fe70a5 -> 6c302577)

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 d8fe70a5 Fix XML
     new 471cbbc7 Sort members
     new 6c302577 Fix Javadoc

The 2 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:
 .../archivers/zip/DefaultBackingStoreSupplier.java |  6 +++---
 .../commons/compress/archivers/zip/ZipFile.java    | 24 +++++++++++-----------
 .../archivers/tar/TarArchiveInputStreamTest.java   |  8 ++++----
 3 files changed, 19 insertions(+), 19 deletions(-)


[commons-compress] 01/02: Sort members

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 471cbbc7cecac7730ae3db91f8e7bcdc61b94efb
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Mar 13 08:28:27 2023 -0400

    Sort members
---
 .../archivers/zip/DefaultBackingStoreSupplier.java |  6 +++---
 .../commons/compress/archivers/zip/ZipFile.java    | 24 +++++++++++-----------
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/DefaultBackingStoreSupplier.java b/src/main/java/org/apache/commons/compress/archivers/zip/DefaultBackingStoreSupplier.java
index 67cd6f9e..64abe13a 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/DefaultBackingStoreSupplier.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/DefaultBackingStoreSupplier.java
@@ -46,6 +46,9 @@ public class DefaultBackingStoreSupplier implements ScatterGatherBackingStoreSup
 
     private static final String PREFIX = "parallelscatter";
 
+    private final AtomicInteger storeNum = new AtomicInteger();
+
+    private final Path dir;
     /**
      * Constructs a new instance. If {@code dir} is null, then use the default temporary-file directory.
      *
@@ -55,9 +58,6 @@ public class DefaultBackingStoreSupplier implements ScatterGatherBackingStoreSup
         this.dir = dir;
     }
 
-    private final AtomicInteger storeNum = new AtomicInteger();
-    private final Path dir;
-
     @Override
     public ScatterGatherBackingStore get() throws IOException {
         final String suffix = "n" + storeNum.incrementAndGet();
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
index 9ce792f2..641afca0 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
@@ -344,6 +344,18 @@ public class ZipFile implements Closeable {
         /* compressed size                 */ + ZipConstants.WORD
         /* uncompressed size               */ + (long) ZipConstants.WORD;
 
+    /**
+     * Compares two ZipArchiveEntries based on their offset within the archive.
+     *
+     * <p>Won't return any meaningful results if one of the entries
+     * isn't part of the archive at all.</p>
+     *
+     * @since 1.1
+     */
+    private static final Comparator<ZipArchiveEntry> offsetComparator =
+        Comparator.comparingLong(ZipArchiveEntry::getDiskNumberStart)
+            .thenComparingLong(ZipArchiveEntry::getLocalHeaderOffset);
+
     /**
      * Closes a ZIP file quietly; throwing no IOException, dooes nothing
      * on null input.
@@ -426,18 +438,6 @@ public class ZipFile implements Closeable {
 
     private long firstLocalFileHeaderOffset;
 
-    /**
-     * Compares two ZipArchiveEntries based on their offset within the archive.
-     *
-     * <p>Won't return any meaningful results if one of the entries
-     * isn't part of the archive at all.</p>
-     *
-     * @since 1.1
-     */
-    private static final Comparator<ZipArchiveEntry> offsetComparator =
-        Comparator.comparingLong(ZipArchiveEntry::getDiskNumberStart)
-            .thenComparingLong(ZipArchiveEntry::getLocalHeaderOffset);
-
     /**
      * Opens the given file for reading, assuming "UTF8" for file names.
      *


[commons-compress] 02/02: Fix Javadoc

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 6c30257724369621169528b0a08fb365538805eb
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Mar 13 08:33:26 2023 -0400

    Fix Javadoc
---
 .../commons/compress/archivers/tar/TarArchiveInputStreamTest.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java b/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
index c72074ca..b912500e 100644
--- a/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
@@ -162,7 +162,7 @@ public class TarArchiveInputStreamTest extends AbstractTestCase {
     }
 
     /**
-     * @link "https://issues.apache.org/jira/browse/COMPRESS-324"
+     * @see <a href="https://issues.apache.org/jira/browse/COMPRESS-324">COMPRESS-324</a>
      */
     @Test
     public void shouldReadGNULongNameEntryWithWrongName() throws Exception {
@@ -229,7 +229,7 @@ public class TarArchiveInputStreamTest extends AbstractTestCase {
     }
 
     /**
-     * @link "https://issues.apache.org/jira/browse/COMPRESS-417"
+     * @see <a href="https://issues.apache.org/jira/browse/COMPRESS-417">COMPRESS-417</a>
      */
     @Test
     public void skipsDevNumbersWhenEntryIsNoDevice() throws Exception {
@@ -243,7 +243,7 @@ public class TarArchiveInputStreamTest extends AbstractTestCase {
     }
 
     /**
-     * @link "https://issues.apache.org/jira/browse/COMPRESS-355"
+     * @see <a href="https://issues.apache.org/jira/browse/COMPRESS-355">COMPRESS-355</a>
      */
     @Test
     public void survivesBlankLinesInPaxHeader() throws Exception {
@@ -256,7 +256,7 @@ public class TarArchiveInputStreamTest extends AbstractTestCase {
     }
 
     /**
-     * @link "https://issues.apache.org/jira/browse/COMPRESS-356"
+     * @see <a href="https://issues.apache.org/jira/browse/COMPRESS-356">COMPRESS-356</a>
      */
     @Test
     public void survivesPaxHeaderWithNameEndingInSlash() throws Exception {