Skip to content

Commit

Permalink
Removes redundant FileSystem decisions
Browse files Browse the repository at this point in the history
  • Loading branch information
linghengqian committed Feb 29, 2024
1 parent 685ef45 commit 875f5b8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ private static JarFile getJarFile(final URL url) {
@SneakyThrows({IOException.class, URISyntaxException.class})
private static Stream<String> readDirectoryInFileSystem(final URL directoryUrl) {
if ("resource".equals(directoryUrl.getProtocol())) {
try (FileSystem ignored = FileSystems.getFileSystem(directoryUrl.toURI())) {
try {
return loadFromDirectory(directoryUrl);
} catch (FileSystemNotFoundException exception) {
FileSystem nativeImageResourceFileSystem = FileSystems.newFileSystem(directoryUrl.toURI(), Collections.emptyMap());
Expand Down

0 comments on commit 875f5b8

Please sign in to comment.