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=refs%2Fpull%2F55%2Fhead;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)); } }