Ignore:
Timestamp:
2018-09-09T00:50:46+02:00 (6 years ago)
Author:
Don-vip
Message:

see #16047 - make JOSM able to load JAXB as a plugin:

  • JAXB initialize itself through ServiceLoader and context class loader so it must be set correctly when initializing a plugin
  • plugin class loaders were not loading resources correctly
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/plugins/PluginClassLoader.java

    r13849 r14232  
    8181
    8282    @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
    8397    public String toString() {
    8498        return "PluginClassLoader [urls=" + Arrays.toString(getURLs()) +
Note: See TracChangeset for help on using the changeset viewer.