Merge pull request #4955 from gastaldi/deprecated

Avoid using deprecated File.toURL
This commit is contained in:
Stuart Douglas
2019-10-29 15:04:48 +11:00
committed by GitHub

View File

@@ -65,7 +65,7 @@ public class ClassLoaderCompiler {
String path = url.getPath();
if (path.startsWith("file:")) {
path = path.substring(5, path.lastIndexOf('!'));
urls.add(new File(URLDecoder.decode(path, StandardCharsets.UTF_8.name())).toURL());
urls.add(new File(URLDecoder.decode(path, StandardCharsets.UTF_8.name())).toURI().toURL());
}
}
}