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/02/28 02:22:16 UTC

(commons-compress) branch master updated: Simplify message building

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


The following commit(s) were added to refs/heads/master by this push:
     new 1f64067b0 Simplify message building
1f64067b0 is described below

commit 1f64067b034a11546857636dfa3091b079985853
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Feb 27 21:22:11 2024 -0500

    Simplify message building
---
 .../java/org/apache/commons/compress/archivers/tar/TarUtils.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java
index 8ce32b42c..97c188453 100644
--- a/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java
+++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java
@@ -596,14 +596,14 @@ public class TarUtils {
             readResult = readLineOfNumberForPax1X(inputStream);
             final long sparseOffset = readResult[0];
             if (sparseOffset < 0) {
-                throw new IOException("Corrupted TAR archive." + " Sparse header block offset contains negative value");
+                throw new IOException("Corrupted TAR archive. Sparse header block offset contains negative value");
             }
             bytesRead += readResult[1];
 
             readResult = readLineOfNumberForPax1X(inputStream);
             final long sparseNumbytes = readResult[0];
             if (sparseNumbytes < 0) {
-                throw new IOException("Corrupted TAR archive." + " Sparse header block numbytes contains negative value");
+                throw new IOException("Corrupted TAR archive. Sparse header block numbytes contains negative value");
             }
             bytesRead += readResult[1];
             sparseHeaders.add(new TarArchiveStructSparse(sparseOffset, sparseNumbytes));
@@ -709,7 +709,7 @@ public class TarUtils {
                                 final byte[] rest = IOUtils.readRange(inputStream, restLen);
                                 final int got = rest.length;
                                 if (got != restLen) {
-                                    throw new IOException("Failed to read " + "Paxheader. Expected " + restLen + " bytes, read " + got);
+                                    throw new IOException("Failed to read Paxheader. Expected " + restLen + " bytes, read " + got);
                                 }
                                 totalRead += restLen;
                                 // Drop trailing NL