Added stream close snippet
This commit is contained in:
parent
09b7c6e822
commit
5b09ae5275
|
@ -102,6 +102,7 @@ public class FileOperationsTest {
|
|||
StringBuilder data = new StringBuilder();
|
||||
Stream<String> lines = Files.lines(path);
|
||||
lines.forEach(line -> data.append(line).append("\n"));
|
||||
lines.close();
|
||||
|
||||
Assert.assertEquals(expectedData, data.toString().trim());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue