Skip to content

Commit 7f351be

Browse files
committed
Moved FileSystem out of try-with-resources statement
1 parent 5a77c6b commit 7f351be

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/java/net/javadiscord/javabot/data/h2db/MigrationUtils.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ public static Path getMigrationsDirectory() throws URISyntaxException, IOExcepti
3333
return Path.of(uri);
3434
} catch (FileSystemNotFoundException e) {
3535
Map<String, String> env = new HashMap<>();
36-
try (FileSystem dir = FileSystems.newFileSystem(uri, env)) {
37-
return dir.getPath("/database/migrations/");
38-
}
36+
FileSystem dir = FileSystems.newFileSystem(uri, env);
37+
return dir.getPath("/database/migrations/");
3938
}
4039
}
4140
}

0 commit comments

Comments
 (0)