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/17 20:23:44 UTC
[commons-compress] branch master updated: Better exception message
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 dfca0ffd Better exception message
dfca0ffd is described below
commit dfca0ffdcd2cf0e2bcc8d456ea795ccf927ee62f
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Mar 17 16:23:39 2023 -0400
Better exception message
---
.../java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
index b1b19c7e..861f4a9f 100644
--- a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
+++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
@@ -171,7 +171,7 @@ public class SevenZFile implements Closeable {
};
private static int assertFitsIntoNonNegativeInt(final String what, final long value) throws IOException {
if (value > Integer.MAX_VALUE || value < 0) {
- throw new IOException("Cannot handle " + what + " " + value);
+ throw new IOException(String.format("Cannot handle % %,d", what, value));
}
return (int) value;
}