From dff2c20814c92e20f11f4fe72bed5d2065b0b1b7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?M=C3=A1rio=20Franco?= Date: Mon, 20 Jul 2015 13:48:51 +0100 Subject: [PATCH] Stop leafs first --- pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); } } -- 2.39.5