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/10/09 22:06:49 UTC
[commons-compress] branch master updated (40a3ee54 -> 2de9f673)
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 40a3ee54 Bump org.ow2.asm:asm from 9.5 to 9.6 #421
new bd6ba252 Simplify exception handling
new 90b12d7c Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-compress.git
new 2de9f673 Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-compress.git
The 3 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/zip/ZipFileTest.java | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
[commons-compress] 02/03: Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-compress.git
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 90b12d7c1ce6b3f0ea6cc10a69d2a9b12e65a04c
Merge: bd6ba252 5bc45833
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Oct 5 07:11:09 2023 -0400
Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-compress.git
pom.xml | 3 ---
.../org/apache/commons/compress/archivers/zip/ExtraFieldUtils.java | 5 ++++-
src/main/java/org/apache/commons/compress/java/util/jar/Pack200.java | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
[commons-compress] 01/03: Simplify exception handling
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 bd6ba252d8454b541d21bbadb613b834cc43aad9
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Sep 30 12:21:41 2023 -0400
Simplify exception handling
---
.../commons/compress/archivers/zip/ZipFileTest.java | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
index f4bdc780..2a62104c 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
@@ -55,6 +55,7 @@ import org.apache.commons.compress.AbstractTestCase;
import org.apache.commons.compress.utils.ByteUtils;
import org.apache.commons.compress.utils.IOUtils;
import org.apache.commons.compress.utils.SeekableInMemoryByteChannel;
+import org.apache.commons.io.function.IORunnable;
import org.apache.commons.lang3.SystemUtils;
import org.junit.Assume;
import org.junit.jupiter.api.AfterEach;
@@ -84,13 +85,11 @@ public class ZipFileTest extends AbstractTestCase {
private ZipFile zf = null;
- private void assertAllReadMethods(final byte[] expected, final ZipFile zipFile, final ZipArchiveEntry entry) {
+ private void assertAllReadMethods(final byte[] expected, final ZipFile zipFile, final ZipArchiveEntry entry) throws IOException {
// simple IOUtil read
try (InputStream stream = zf.getInputStream(entry)) {
final byte[] full = IOUtils.toByteArray(stream);
assertArrayEquals(expected, full);
- } catch (final IOException ex) {
- throw new AssertionError(ex);
}
// big buffer at the beginning and then chunks by IOUtils read
@@ -445,14 +444,14 @@ public class ZipFileTest extends AbstractTestCase {
}
final AtomicInteger passedCount = new AtomicInteger();
- final Runnable run = () -> {
+ final IORunnable run = () -> {
for (final ZipArchiveEntry entry: Collections.list(zf.getEntries())) {
assertAllReadMethods(content.get(entry.getName()), zf, entry);
}
passedCount.incrementAndGet();
};
- final Thread t0 = new Thread(run);
- final Thread t1 = new Thread(run);
+ final Thread t0 = new Thread(run.asRunnable());
+ final Thread t1 = new Thread(run.asRunnable());
t0.start();
t1.start();
t0.join();
@@ -477,14 +476,14 @@ public class ZipFileTest extends AbstractTestCase {
}}
final AtomicInteger passedCount = new AtomicInteger();
- final Runnable run = () -> {
+ final IORunnable run = () -> {
for (final ZipArchiveEntry entry : Collections.list(zf.getEntries())) {
assertAllReadMethods(content.get(entry.getName()), zf, entry);
}
passedCount.incrementAndGet();
};
- final Thread t0 = new Thread(run);
- final Thread t1 = new Thread(run);
+ final Thread t0 = new Thread(run.asRunnable());
+ final Thread t1 = new Thread(run.asRunnable());
t0.start();
t1.start();
t0.join();
[commons-compress] 03/03: Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-compress.git
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 2de9f673e91558f23bb2e5fa04ed36ea332b6c8e
Merge: 90b12d7c 40a3ee54
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Oct 9 13:18:02 2023 -0400
Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-compress.git
pom.xml | 4 ++--
src/changes/changes.xml | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)