OF-1204: Unload all child plugins

By removing the parent mapping, any other child plugin fails to unload.
parent 8d0c5498
...@@ -642,15 +642,14 @@ public class PluginManager ...@@ -642,15 +642,14 @@ public class PluginManager
// See if any child plugins are defined. // See if any child plugins are defined.
if ( parentPluginMap.containsKey( plugin ) ) if ( parentPluginMap.containsKey( plugin ) )
{ {
String[] childPlugins = String[] childPlugins = parentPluginMap.get( plugin ).toArray( new String[ parentPluginMap.get( plugin ).size() ] );
parentPluginMap.get( plugin ).toArray( new String[ parentPluginMap.get( plugin ).size() ] );
parentPluginMap.remove( plugin );
for ( String childPlugin : childPlugins ) for ( String childPlugin : childPlugins )
{ {
Log.debug( "Unloading child plugin: '{}'.", childPlugin ); Log.debug( "Unloading child plugin: '{}'.", childPlugin );
childPluginMap.remove( plugins.get( childPlugin ) ); childPluginMap.remove( plugins.get( childPlugin ) );
unloadPlugin( childPlugin ); unloadPlugin( childPlugin );
} }
parentPluginMap.remove( plugin );
} }
Path webXML = pluginDirectory.resolve( pluginName ).resolve( "web" ).resolve( "WEB-INF" ).resolve( "web.xml" ); Path webXML = pluginDirectory.resolve( pluginName ).resolve( "web" ).resolve( "WEB-INF" ).resolve( "web.xml" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment