test(dijkstra): close open file readers
This commit is contained in:
parent
e728c77982
commit
f6f431fce1
1 changed files with 4 additions and 0 deletions
|
@ -40,9 +40,13 @@ public class DijkstraAlgorithmTest {
|
|||
|
||||
// Read the graph. X
|
||||
this.graph = reader.read();
|
||||
// free resources
|
||||
reader.close();
|
||||
|
||||
// Create a PathReader.
|
||||
final PathReader pathReader = new BinaryPathReader(new DataInputStream(new BufferedInputStream(new FileInputStream(pathName))));
|
||||
// free resources
|
||||
pathReader.close();
|
||||
|
||||
// Read the path.
|
||||
this.path = pathReader.readPath(graph);
|
||||
|
|
Loading…
Reference in a new issue