Skip to content

Commit

Permalink
Fix Resources.file on Java 17/21
Browse files Browse the repository at this point in the history
  • Loading branch information
jjlauer committed Oct 1, 2024
1 parent 07c7bd0 commit 0c29e68
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ static public void file(String resourceName, BiConsumer<Boolean,Path> consumer)
// we'll skip the file: part too
String jarPath = jarPathAndInnerFile.substring(5, sepPos);
String filePath = jarPathAndInnerFile.substring(sepPos + 1);
try (FileSystem fs = FileSystems.newFileSystem(Paths.get(jarPath), null)) {
try (FileSystem fs = FileSystems.newFileSystem(Paths.get(jarPath), Resources.class.getClassLoader())) {
consumer.accept(false, fs.getPath(filePath));
return;
}
Expand Down

0 comments on commit 0c29e68

Please sign in to comment.