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 2022/12/11 06:07:32 UTC

[commons-compress] branch master updated (1cb7fe2b -> 0082648e)

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 1cb7fe2b Javadoc
     new 65770702 Remove @SuppressWarnings
     new 0082648e 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:
 .../commons/compress/archivers/sevenz/LZMADecoder.java       |  1 -
 .../archivers/tar/TarArchiveSparseZeroInputStream.java       |  9 +++++----
 .../commons/compress/archivers/zip/CircularBuffer.java       | 12 +++++++++---
 3 files changed, 14 insertions(+), 8 deletions(-)


[commons-compress] 01/02: Remove @SuppressWarnings

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 657707024867925b4122ffc77821128436a5b572
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Dec 11 01:02:23 2022 -0500

    Remove @SuppressWarnings
---
 .../java/org/apache/commons/compress/archivers/sevenz/LZMADecoder.java   | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/LZMADecoder.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/LZMADecoder.java
index 7fc92af7..82626e8f 100644
--- a/src/main/java/org/apache/commons/compress/archivers/sevenz/LZMADecoder.java
+++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/LZMADecoder.java
@@ -56,7 +56,6 @@ class LZMADecoder extends AbstractCoder {
         return lzmaIn;
     }
 
-    @SuppressWarnings("resource")
     @Override
     OutputStream encode(final OutputStream out, final Object opts)
         throws IOException {


[commons-compress] 02/02: 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 0082648ee4f23ddc9ec643a841feb56f4c8887d0
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Dec 11 01:07:28 2022 -0500

    Javadoc
---
 .../archivers/tar/TarArchiveSparseZeroInputStream.java       |  9 +++++----
 .../commons/compress/archivers/zip/CircularBuffer.java       | 12 +++++++++---
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveSparseZeroInputStream.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveSparseZeroInputStream.java
index 740e44e7..2598379c 100644
--- a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveSparseZeroInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveSparseZeroInputStream.java
@@ -21,14 +21,15 @@ import java.io.IOException;
 import java.io.InputStream;
 
 /**
- * This is an inputstream that always return 0,
+ * This is an InputStream that always return 0,
  * this is used when reading the "holes" of a sparse file
  */
 class TarArchiveSparseZeroInputStream extends InputStream {
 
     /**
-     * Just return 0
-     * @return
+     * Returns 0.
+     *
+     * @return 0
      * @throws IOException
      */
     @Override
@@ -37,7 +38,7 @@ class TarArchiveSparseZeroInputStream extends InputStream {
     }
 
     /**
-     * these's nothing need to do when skipping
+     * Returns the input.
      *
      * @param n bytes to skip
      * @return bytes actually skipped
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/CircularBuffer.java b/src/main/java/org/apache/commons/compress/archivers/zip/CircularBuffer.java
index 69b15976..ba1c3b2a 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/CircularBuffer.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/CircularBuffer.java
@@ -44,14 +44,18 @@ class CircularBuffer {
     }
 
     /**
-     * Tells if a new byte can be read from the buffer.
+     * Tests whether a new byte can be read from the buffer.
+     *
+     * @return Whether a new byte can be read from the buffer.
      */
     public boolean available() {
         return readIndex != writeIndex;
     }
 
     /**
-     * Writes a byte to the buffer.
+     * Puts a byte to the buffer.
+     *
+     * @param value the value to put.
      */
     public void put(final int value) {
         buffer[writeIndex] = (byte) value;
@@ -60,6 +64,8 @@ class CircularBuffer {
 
     /**
      * Reads a byte from the buffer.
+     *
+     * @return a byte from the buffer.
      */
     public int get() {
         if (available()) {
@@ -71,7 +77,7 @@ class CircularBuffer {
     }
 
     /**
-     * Copy a previous interval in the buffer to the current position.
+     * Copies a previous interval in the buffer to the current position.
      *
      * @param distance the distance from the current write position
      * @param length   the number of bytes to copy