Modify

Opened 4 weeks ago

Closed 2 weeks 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 Changed 4 weeks ago by GerdP

Yes, seems to be too lazy. I wonder why it is done. AFAIK we never unload plugins?

comment:2 Changed 2 weeks ago by Don-vip

Keywords: classloader added
Milestone: 21.02
Owner: changed from team to Don-vip
Status: newassigned

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.

comment:3 Changed 2 weeks ago by Don-vip

Resolution: fixed
Status: assignedclosed

In 17511/josm:

fix #20458 - don't clear plugin classloaders each time we load a category of plugins

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.