Commit e4c2ac5a authored by Florian Schmaus's avatar Florian Schmaus

Merge pull request #19 from sco0ter/master

Replace deprecated toURL() with toURI().toURL() as per the JavaDoc
parents 31acd101 ee9e5f47
...@@ -66,25 +66,25 @@ public class PluginClassLoader extends URLClassLoader { ...@@ -66,25 +66,25 @@ public class PluginClassLoader extends URLClassLoader {
// Add classes directory to classpath. // Add classes directory to classpath.
File classesDir = new File(directory, "classes"); File classesDir = new File(directory, "classes");
if (classesDir.exists()) { if (classesDir.exists()) {
addURL(classesDir.toURL()); addURL(classesDir.toURI().toURL());
} }
// Add i18n directory to classpath. // Add i18n directory to classpath.
File databaseDir = new File(directory, "database"); File databaseDir = new File(directory, "database");
if(databaseDir.exists()){ if(databaseDir.exists()){
addURL(databaseDir.toURL()); addURL(databaseDir.toURI().toURL());
} }
// Add i18n directory to classpath. // Add i18n directory to classpath.
File i18nDir = new File(directory, "i18n"); File i18nDir = new File(directory, "i18n");
if(i18nDir.exists()){ if(i18nDir.exists()){
addURL(i18nDir.toURL()); addURL(i18nDir.toURI().toURL());
} }
// Add web directory to classpath. // Add web directory to classpath.
File webDir = new File(directory, "web"); File webDir = new File(directory, "web");
if(webDir.exists()){ if(webDir.exists()){
addURL(webDir.toURL()); addURL(webDir.toURI().toURL());
} }
// Add lib directory to classpath. // Add lib directory to classpath.
......
...@@ -409,7 +409,7 @@ public class PluginManager { ...@@ -409,7 +409,7 @@ public class PluginManager {
if (classes.exists()) { if (classes.exists()) {
dev.setClassesDir(classes); dev.setClassesDir(classes);
pluginLoader.addURLFile(classes.getAbsoluteFile().toURL()); pluginLoader.addURLFile(classes.getAbsoluteFile().toURI().toURL());
} }
} }
} }
......
...@@ -595,7 +595,7 @@ public class Launcher { ...@@ -595,7 +595,7 @@ public class Launcher {
// Just for fun. Show no matter what for two seconds. // Just for fun. Show no matter what for two seconds.
Thread.sleep(2000); Thread.sleep(2000);
copy(plugin.toURL(), tempPluginsFile); copy(plugin.toURI().toURL(), tempPluginsFile);
// If successfull, rename to real plugin name. // If successfull, rename to real plugin name.
tempPluginsFile.renameTo(realPluginsFile); tempPluginsFile.renameTo(realPluginsFile);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment