Browse Source

Fix plugin mta data URIs to work under windows

Change-Id: Ia09cde20a8899e07e20ffab79f4cd64a1d30dec6
Reviewed-on: http://gerrit.dmdirc.com/2068
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Chris Smith <chris@dmdirc.com>
tags/0.6.6b1
Greg Holmes 13 years ago
parent
commit
4a0789f5b4

+ 2
- 2
src/com/dmdirc/logger/ErrorManager.java View File

45
     private static final ErrorManager ME = new ErrorManager();
45
     private static final ErrorManager ME = new ErrorManager();
46
 
46
 
47
     /** A list of exceptions which we don't consider bugs and thus don't report. */
47
     /** A list of exceptions which we don't consider bugs and thus don't report. */
48
-    private static final Class[] BANNED_EXCEPTIONS = new Class[]{
48
+    private static final Class<?>[] BANNED_EXCEPTIONS = new Class<?>[]{
49
         NoSuchMethodError.class, NoClassDefFoundError.class,
49
         NoSuchMethodError.class, NoClassDefFoundError.class,
50
         UnsatisfiedLinkError.class, AbstractMethodError.class,
50
         UnsatisfiedLinkError.class, AbstractMethodError.class,
51
         IllegalAccessError.class, OutOfMemoryError.class,
51
         IllegalAccessError.class, OutOfMemoryError.class,
236
         Throwable target = exception;
236
         Throwable target = exception;
237
 
237
 
238
         while (target != null) {
238
         while (target != null) {
239
-            for (Class bad : BANNED_EXCEPTIONS) {
239
+            for (Class<?> bad : BANNED_EXCEPTIONS) {
240
                 if (bad.equals(target.getClass())) {
240
                 if (bad.equals(target.getClass())) {
241
                     return false;
241
                     return false;
242
                 }
242
                 }

+ 2
- 2
src/com/dmdirc/plugins/PluginManager.java View File

268
 
268
 
269
         try {
269
         try {
270
             final PluginMetaData metadata = new PluginMetaData(
270
             final PluginMetaData metadata = new PluginMetaData(
271
-                    new URL("jar:file://" + getDirectory() + filename
271
+                    new URL("jar:file:" + getDirectory() + filename
272
                     + "!/META-INF/plugin.config"),
272
                     + "!/META-INF/plugin.config"),
273
                     new URL("file:" + getDirectory() + filename));
273
                     new URL("file:" + getDirectory() + filename));
274
             metadata.load();
274
             metadata.load();
494
         for (String target : pluginPaths) {
494
         for (String target : pluginPaths) {
495
             try {
495
             try {
496
                 final PluginMetaData targetMetaData = new PluginMetaData(
496
                 final PluginMetaData targetMetaData = new PluginMetaData(
497
-                        new URL("jar:file://" + getDirectory() + target
497
+                        new URL("jar:file:" + getDirectory() + target
498
                         + "!/META-INF/plugin.config"),
498
                         + "!/META-INF/plugin.config"),
499
                         new URL("file:" + getDirectory() + target));
499
                         new URL("file:" + getDirectory() + target));
500
                 targetMetaData.load();
500
                 targetMetaData.load();

Loading…
Cancel
Save