diff --git a/li.strolch.service/src/main/java/li/strolch/execution/EventBasedExecutionHandler.java b/li.strolch.service/src/main/java/li/strolch/execution/EventBasedExecutionHandler.java index 131915b20..550a00cf4 100644 --- a/li.strolch.service/src/main/java/li/strolch/execution/EventBasedExecutionHandler.java +++ b/li.strolch.service/src/main/java/li/strolch/execution/EventBasedExecutionHandler.java @@ -45,11 +45,11 @@ public class EventBasedExecutionHandler extends ExecutionHandler { } @Override - public Collection getControllers(String realm) { + public List getControllers(String realm) { Map controllersByRealm = this.controllers.getMap(realm); if (controllersByRealm == null) - return Collections.emptyList(); - return controllersByRealm.values(); + return new ArrayList<>(); + return new ArrayList<>(controllersByRealm.values()); } @Override diff --git a/li.strolch.service/src/main/java/li/strolch/execution/ExecutionHandler.java b/li.strolch.service/src/main/java/li/strolch/execution/ExecutionHandler.java index 178375073..861d547e3 100644 --- a/li.strolch.service/src/main/java/li/strolch/execution/ExecutionHandler.java +++ b/li.strolch.service/src/main/java/li/strolch/execution/ExecutionHandler.java @@ -1,6 +1,7 @@ package li.strolch.execution; import java.util.Collection; +import java.util.List; import java.util.Set; import java.util.concurrent.ExecutorService; @@ -76,7 +77,7 @@ public abstract class ExecutionHandler extends StrolchComponent { * * @return the controllers */ - public abstract Collection getControllers(String realm); + public abstract List getControllers(String realm); /** * Returns the controller for the given realm and activity, null if it does not exist