From f6f431fce173de83ac0b75e7204d76bb3ae5c947 Mon Sep 17 00:00:00 2001 From: Paul ALNET Date: Fri, 17 May 2024 07:53:17 +0200 Subject: [PATCH] test(dijkstra): close open file readers --- .../graphs/algorithm/shortestpath/DijkstraAlgorithmTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/be-graphes-algos/src/test/java/org/insa/graphs/algorithm/shortestpath/DijkstraAlgorithmTest.java b/be-graphes-algos/src/test/java/org/insa/graphs/algorithm/shortestpath/DijkstraAlgorithmTest.java index 560d42a..9b2b08e 100644 --- a/be-graphes-algos/src/test/java/org/insa/graphs/algorithm/shortestpath/DijkstraAlgorithmTest.java +++ b/be-graphes-algos/src/test/java/org/insa/graphs/algorithm/shortestpath/DijkstraAlgorithmTest.java @@ -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);