Changeset 14232 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2018-09-09T00:50:46+02:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/plugins/PluginClassLoader.java
r13849 r14232 81 81 82 82 @Override 83 public URL findResource(String name) { 84 URL resource = super.findResource(name); 85 if (resource == null) { 86 for (PluginClassLoader dep : dependencies) { 87 resource = dep.findResource(name); 88 if (resource != null) { 89 break; 90 } 91 } 92 } 93 return resource; 94 } 95 96 @Override 83 97 public String toString() { 84 98 return "PluginClassLoader [urls=" + Arrays.toString(getURLs()) + -
trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
r14186 r14232 345 345 try { 346 346 Constructor<?> c = klass.getConstructor(PluginInformation.class); 347 Object plugin = c.newInstance(this); 348 return new PluginProxy(plugin, this, classLoader); 347 ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); 348 Thread.currentThread().setContextClassLoader(classLoader); 349 try { 350 return new PluginProxy(c.newInstance(this), this, classLoader); 351 } finally { 352 Thread.currentThread().setContextClassLoader(contextClassLoader); 353 } 349 354 } catch (ReflectiveOperationException e) { 350 355 throw new PluginException(name, e);
Note:
See TracChangeset
for help on using the changeset viewer.