Opened 4 years ago
Closed 4 years ago
#20458 closed defect (fixed)
Plugin classloaders list cleared too often?
Reported by: | DevCharly | Owned by: | Don-vip |
---|---|---|---|
Priority: | minor | Milestone: | 21.02 |
Component: | Core | Version: | |
Keywords: | classloader | Cc: |
Description
While looking for a fix for #20456, I notices something strange in PluginHandler.loadPlugins()
here:
https://josm.openstreetmap.de/browser/josm/trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java#L853
classLoaders
is a static variable and is always cleared when PluginHandler.loadPlugins()
is invoked, which happens multiple times at startup (for very-early-plugins, early-plugins and late-plugins) and also when downloading a plugin.
This seems not right?
PluginHandler.getPluginClassLoaders()
returns only the plugin classloaders of the last PluginHandler.loadPlugins()
invocation.
Attachments (0)
Change History (3)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
Keywords: | classloader added |
---|---|
Milestone: | → 21.02 |
Owner: | changed from | to
Status: | new → assigned |
I introduced it in r14978 but I don't remember why. I don't see any reason, so it's probably better to remove the clear() call.
Yes, seems to be too lazy. I wonder why it is done. AFAIK we never unload plugins?