test(dijkstra): close open file readers

This commit is contained in:
Paul Alnet 2024-05-17 07:53:17 +02:00
parent e728c77982
commit f6f431fce1

View file

@ -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);