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 2025/08/27 19:37:16 UTC
(commons-compress) 02/04: Fix bug in test
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 17e21604217171de63b2675356f62be6446e2807
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Wed Aug 27 15:04:33 2025 -0400
Fix bug in test
---
.../org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java
index 6da627f36..6c4d85421 100644
--- a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java
@@ -840,7 +840,7 @@ void testReadBigSevenZipFile() throws IOException {
SevenZArchiveEntry entry = sevenZFile.getNextEntry();
while (entry != null) {
if (entry.hasStream()) {
- final byte[] content = new byte[(int) entry.getSize()];
+ final byte[] content = new byte[Math.toIntExact(entry.getSize())];
sevenZFile.read(content);
}
entry = sevenZFile.getNextEntry();