Ignore:
Timestamp:
2017-06-06T13:43:28+02:00 (7 years ago)
Author:
bastiK
Message:

fixed #14901 - restrict plugin classpath

Separate class loader for each plugin instead of unified class loader.

File:
1 edited

Legend:

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

    r12218 r12322  
    316316     *
    317317     * @param klass the plugin class
     318     * @param classLoader the class loader for the plugin
    318319     * @return the instantiated and initialized plugin
    319320     * @throws PluginException if the plugin cannot be loaded or instanciated
    320      */
    321     public PluginProxy load(Class<?> klass) throws PluginException {
     321     * @since 12322
     322     */
     323    public PluginProxy load(Class<?> klass, PluginClassLoader classLoader) throws PluginException {
    322324        try {
    323325            Constructor<?> c = klass.getConstructor(PluginInformation.class);
    324326            Object plugin = c.newInstance(this);
    325             return new PluginProxy(plugin, this);
     327            return new PluginProxy(plugin, this, classLoader);
    326328        } catch (ReflectiveOperationException e) {
    327329            throw new PluginException(name, e);
Note: See TracChangeset for help on using the changeset viewer.