Merge pull request #472 from Cybermaxke/2.x/fix-filesystem-compile-error

Fix ambiguous newFileSystem method when using Java 13.
This commit is contained in:
Riley Park
2021-04-18 14:27:31 -07:00
committed by GitHub

View File

@@ -48,7 +48,7 @@ public class FileSystemUtils {
.getProtectionDomain().getCodeSource().getLocation().getPath());
if (file.isFile()) { // jar
try (FileSystem fileSystem = FileSystems.newFileSystem(file.toPath(), null)) {
try (FileSystem fileSystem = FileSystems.newFileSystem(file.toPath(), (ClassLoader) null)) {
Path toVisit = fileSystem.getPath(path.toString());
if (Files.exists(toVisit)) {
consumer.accept(toVisit);