Skip to content

Commit ce81551

Browse files
committed
CLose streams
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/io/trunk@1686727 13f79535-47bb-0310-9956-ffa450edef68
1 parent 3c8b031 commit ce81551

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,7 @@ public void skipReturnValueWithBom() throws IOException {
699699
BOMInputStream is1 = new BOMInputStream(createUtf8DataStream(baseData, true));
700700
assertEquals(2, is1.skip(2));
701701
assertEquals((byte) 0x33, is1.read());
702+
is1.close();
702703
}
703704

704705
@Test
@@ -707,6 +708,7 @@ public void skipReturnValueWithoutBom() throws IOException {
707708
BOMInputStream is2 = new BOMInputStream(createUtf8DataStream(baseData, false));
708709
assertEquals(2, is2.skip(2)); // IO-428
709710
assertEquals((byte) 0x33, is2.read());
711+
is2.close();
710712
}
711713

712714
@Test

src/test/java/org/apache/commons/io/output/ThresholdingOutputStreamTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,6 @@ protected void thresholdReached() throws IOException {
4747
assertFalse( reached.get());
4848
tos.write(12);
4949
assertTrue(reached.get());
50+
tos.close();
5051
}
5152
}

0 commit comments

Comments
 (0)