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 cc9c730663b639bacc37663ca988c1eee8699d46 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Tue Nov 14 09:11:17 2023 -0500 Use try-with-resources --- .../commons/compress/archivers/arj/ArjArchiveInputStreamTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStreamTest.java b/src/test/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStreamTest.java index f8b063bda..a3747b910 100644 --- a/src/test/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStreamTest.java +++ b/src/test/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStreamTest.java @@ -64,7 +64,9 @@ public class ArjArchiveInputStreamTest extends AbstractTest { public void testFirstHeaderSizeSetToZero() throws Exception { try (InputStream in = newInputStream("arj/zero_sized_headers.arj")) { final ArchiveException ex = assertThrows(ArchiveException.class, () -> { - ArjArchiveInputStream archive = new ArjArchiveInputStream(in); + try (ArjArchiveInputStream archive = new ArjArchiveInputStream(in)) { + // empty + } }); assertTrue(ex.getCause() instanceof IOException); }