diff --git a/common/workflow-core/src/main/scala/org/apache/texera/amber/core/storage/util/dataset/GitVersionControlLocalFileStorage.java b/common/workflow-core/src/main/scala/org/apache/texera/amber/core/storage/util/dataset/GitVersionControlLocalFileStorage.java index 9208bad126a..72566dd2d70 100644 --- a/common/workflow-core/src/main/scala/org/apache/texera/amber/core/storage/util/dataset/GitVersionControlLocalFileStorage.java +++ b/common/workflow-core/src/main/scala/org/apache/texera/amber/core/storage/util/dataset/GitVersionControlLocalFileStorage.java @@ -78,12 +78,10 @@ public static void removeFileFromRepo(Path repoPath, Path filePath) throws IOExc * @throws IOException If an I/O error occurs. */ public static void deleteRepo(Path directoryPath) throws IOException { - try (var stream = Files.walk(directoryPath)) { - stream - .sorted(Comparator.reverseOrder()) - .map(Path::toFile) - .forEach(File::delete); - } + Files.walk(directoryPath) + .sorted(Comparator.reverseOrder()) + .map(Path::toFile) + .forEach(File::delete); } /**