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 ae5845166 Use IOUtils.close(...)
ae5845166 is described below
commit ae5845166cfdfcd0e386a6e280a2d7099cdb227e
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Dec 11 16:07:30 2025 -0500
Use IOUtils.close(...)
---
.../org/apache/commons/compress/archivers/sevenz/SevenZFile.java | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
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 11b3cf2d0..3f6a3079a 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
@@ -630,11 +630,7 @@ private SevenZFile(final Builder builder) throws
IOException {
this.password = password != null ? Arrays.copyOf(password,
password.length) : null;
} catch (final ArithmeticException | IllegalArgumentException e) {
final ArchiveException archiveException = new ArchiveException(e);
- try {
- channel.close();
- } catch (final IOException suppressed) {
- archiveException.addSuppressed(suppressed);
- }
+ IOUtils.close(channel, archiveException::addSuppressed);
throw archiveException;
}
}