Changeset 17664 in josm


Ignore:
Timestamp:
2021-03-25T14:28:33+01:00 (4 years ago)
Author:
Don-vip
Message:

see #18737 - Call parent.loadClass(String) - IcedTea-Web JNLPClassLoader overrides loadClass(String) but not loadClass(String, boolean)

File:
1 edited

Legend:

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

    r14234 r17664  
    6666                    }
    6767                } catch (ClassNotFoundException e) {
    68                     // do nothing
    69                     Logging.trace("Plugin class not found in {0}: {1}", dep, e.getMessage());
     68                    Logging.trace("Plugin class not found in dep {0}: {1}", dep, e.getMessage());
    7069                    Logging.trace(e);
    7170                }
    7271            }
    73             result = super.loadClass(name, resolve);
     72            try {
     73                // Will delegate to parent.loadClass(name, resolve) if needed
     74                result = super.loadClass(name, resolve);
     75            } catch (ClassNotFoundException e) {
     76                Logging.trace("Plugin class not found in super {0}: {1}", this, e.getMessage());
     77                Logging.trace(e);
     78            }
     79        }
     80        // IcedTea-Web JNLPClassLoader overrides loadClass(String) but not loadClass(String, boolean)
     81        if (result == null && getParent() != null) {
     82            try {
     83                result = getParent().loadClass(name);
     84            } catch (ClassNotFoundException e) {
     85                Logging.trace("Plugin class not found in parent {0}: {1}", getParent(), e.getMessage());
     86                Logging.trace(e);
     87            }
    7488        }
    7589        if (result != null) {
Note: See TracChangeset for help on using the changeset viewer.