Added handlers sorting to provide stable invocation sequence between runs
@@ -24,6 +24,7 @@ import java.net.URL;
import java.net.URLClassLoader;
import java.util.Arrays;
import java.util.Collections;
+import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -165,6 +166,7 @@ public class PluginReflectionUtility {
return reflections.getSubTypesOf(handlerClass).stream()
.map(PluginReflectionUtility::getHandlerInstance)
.filter(Objects::nonNull)
+ .sorted(Comparator.comparing(handler -> handler.getClass().getCanonicalName())) // to provide stable handlers sequence between runs
.collect(Collectors.toList());
}
