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 175f481  Fix input stream resource leak in test.
175f481 is described below

commit 175f4817cc8926b00baf74e3634f0933cddae91e
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Dec 1 14:40:06 2021 -0500

    Fix input stream resource leak in test.
---
 src/test/java/org/apache/commons/compress/compressors/XZTestCase.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/src/test/java/org/apache/commons/compress/compressors/XZTestCase.java 
b/src/test/java/org/apache/commons/compress/compressors/XZTestCase.java
index 67b78a0..9b31e2a 100644
--- a/src/test/java/org/apache/commons/compress/compressors/XZTestCase.java
+++ b/src/test/java/org/apache/commons/compress/compressors/XZTestCase.java
@@ -42,7 +42,7 @@ public final class XZTestCase extends AbstractTestCase {
         try (OutputStream out = Files.newOutputStream(output.toPath())) {
             try (CompressorOutputStream cos = new CompressorStreamFactory()
                     .createCompressorOutputStream("xz", out)) {
-                IOUtils.copy(Files.newInputStream(input.toPath()), cos);
+                Files.copy(input.toPath(), cos);
             }
         }
     }

Reply via email to