Skip to content

Commit 0a54210

Browse files
committed
minor fix
1 parent 51be799 commit 0a54210

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎core-java-io/src/test/java/com/baeldung/filechannel/FileChannelUnitTest.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public void givenFile_whenReadWithFileChannelUsingFileInputStream_thenCorrect()
6666
}
6767

6868
assertEquals(expected_value, out.toString());
69+
out.close();
6970
channel.close();
7071
fin.close();
7172
}
@@ -141,6 +142,7 @@ public void givenFile_whenReadWithFileChannelGetPosition_thenCorrect() throws IO
141142
channel.position(4);
142143
assertEquals(4, channel.position());
143144

145+
out.close();
144146
channel.close();
145147
reader.close();
146148
}

0 commit comments

Comments
 (0)