Skip to content

Commit 4b52a6f

Browse files
author
Gary Gregory
committed
Use IOUtils
1 parent 7a6d0d5 commit 4b52a6f

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/test/java/org/apache/commons/io/input/AbstractInputStreamTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import java.io.InputStream;
2424

2525
import org.apache.commons.io.FileUtils;
26+
import org.apache.commons.io.IOUtils;
2627
import org.apache.commons.lang3.RandomUtils;
2728
import org.junit.jupiter.api.AfterEach;
2829
import org.junit.jupiter.api.BeforeEach;
@@ -54,10 +55,7 @@ public void setUp() throws IOException {
5455
@AfterEach
5556
public void tearDown() throws IOException {
5657
inputFile.delete();
57-
58-
for (final InputStream is : inputStreams) {
59-
is.close();
60-
}
58+
IOUtils.close(inputStreams);
6159
}
6260

6361
@Test

0 commit comments

Comments
 (0)