From ded0b1f5190630c0e1cac28a8fd5f86bd568ddfa Mon Sep 17 00:00:00 2001 From: Decebal Suiu Date: Tue, 13 Nov 2012 11:05:12 +0200 Subject: [PATCH] stop only started plugins --- .../main/java/ro/fortsoft/pf4j/DefaultPluginManager.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginManager.java b/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginManager.java index 34b3987..20358ec 100644 --- a/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginManager.java +++ b/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginManager.java @@ -113,9 +113,6 @@ public class DefaultPluginManager implements PluginManager { System.setProperty("pf4j.pluginsDir", pluginsDirectory.getAbsolutePath()); } - /** - * Retrieves all active plugins. - */ public List getPlugins() { return new ArrayList(plugins.values()); } @@ -144,7 +141,6 @@ public class DefaultPluginManager implements PluginManager { * Start all active plugins. */ public void startPlugins() { - List resolvedPlugins = getResolvedPlugins(); for (PluginWrapper pluginWrapper : resolvedPlugins) { try { LOG.info("Start plugin '" + pluginWrapper.getDescriptor().getPluginId() + "'"); @@ -160,8 +156,7 @@ public class DefaultPluginManager implements PluginManager { * Stop all active plugins. */ public void stopPlugins() { - List resolvedPlugins = getResolvedPlugins(); - for (PluginWrapper pluginWrapper : resolvedPlugins) { + for (PluginWrapper pluginWrapper : startedPlugins) { try { LOG.info("Stop plugin '" + pluginWrapper.getDescriptor().getPluginId() + "'"); pluginWrapper.getPlugin().stop(); -- 2.39.5