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-io.git
commit 4b52a6f541e9e95714fb499232169e0faccfb642 Author: Gary Gregory <gardgreg...@gmail.com> AuthorDate: Tue Jun 21 09:53:10 2022 -0400 Use IOUtils --- .../java/org/apache/commons/io/input/AbstractInputStreamTest.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/apache/commons/io/input/AbstractInputStreamTest.java b/src/test/java/org/apache/commons/io/input/AbstractInputStreamTest.java index d6ac78d7..8be2d503 100644 --- a/src/test/java/org/apache/commons/io/input/AbstractInputStreamTest.java +++ b/src/test/java/org/apache/commons/io/input/AbstractInputStreamTest.java @@ -23,6 +23,7 @@ import java.io.IOException; import java.io.InputStream; import org.apache.commons.io.FileUtils; +import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.RandomUtils; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -54,10 +55,7 @@ public abstract class AbstractInputStreamTest { @AfterEach public void tearDown() throws IOException { inputFile.delete(); - - for (final InputStream is : inputStreams) { - is.close(); - } + IOUtils.close(inputStreams); } @Test