From: Mário Franco Date: Mon, 20 Jul 2015 12:48:51 +0000 (+0100) Subject: Stop leafs first X-Git-Tag: release-0.10.0~8^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dff2c20814c92e20f11f4fe72bed5d2065b0b1b7;p=pf4j.git Stop leafs first --- diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginManager.java b/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginManager.java index d73a5ea..dfa531e 100644 --- a/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginManager.java +++ b/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginManager.java @@ -325,7 +325,7 @@ public class DefaultPluginManager implements PluginManager { while (!dependents.isEmpty()) { String dependent = dependents.remove(0); stopPlugin(dependent, false); - dependents.addAll(dependencyResolver.getDependents(dependent)); + dependents.addAll(0, dependencyResolver.getDependents(dependent)); } }