mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-05 16:15:54 +00:00
File.toURL() is deprecated.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@19471 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
3ec951ec1a
commit
2dd667265b
8 files changed
+15
-15
No files matched your search
@@ -123,19 +123,19 @@ public class ClassicPluginStrategy implements PluginStrategy {
|
||||
|
||||
baseResourceURL = resolve(archive,
|
||||
manifest.getMainAttributes().getValue("Resource-Path"))
|
||||
.toURL();
|
||||
.toURI().toURL();
|
||||
} else {
|
||||
File classes = new File(expandDir, "WEB-INF/classes");
|
||||
if (classes.exists())
|
||||
paths.add(classes.toURL());
|
||||
paths.add(classes.toURI().toURL());
|
||||
File lib = new File(expandDir, "WEB-INF/lib");
|
||||
File[] libs = lib.listFiles(JAR_FILTER);
|
||||
if (libs != null) {
|
||||
for (File jar : libs)
|
||||
paths.add(jar.toURL());
|
||||
paths.add(jar.toURI().toURL());
|
||||
}
|
||||
|
||||
baseResourceURL = expandDir.toURL();
|
||||
baseResourceURL = expandDir.toURI().toURL();
|
||||
}
|
||||
File disableFile = new File(archive.getPath() + ".disabled");
|
||||
if (disableFile.exists()) {
|
||||
@@ -259,12 +259,12 @@ public class ClassicPluginStrategy implements PluginStrategy {
|
||||
fs.setDir(dir);
|
||||
fs.setIncludes(file.getName());
|
||||
for( String included : fs.getDirectoryScanner(new Project()).getIncludedFiles() ) {
|
||||
paths.add(new File(dir,included).toURL());
|
||||
paths.add(new File(dir,included).toURI().toURL());
|
||||
}
|
||||
} else {
|
||||
if(!file.exists())
|
||||
throw new IOException("No such file: "+file);
|
||||
paths.add(file.toURL());
|
||||
paths.add(file.toURI().toURL());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user