From e8964fccb59e41e119ff944cd21fdae15fff20b5 Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Wed, 26 Jan 2022 12:55:59 +0100 Subject: [PATCH] [New] ExecutionHandler.getControllers() returns a List --- .../li/strolch/execution/EventBasedExecutionHandler.java | 6 +++--- .../main/java/li/strolch/execution/ExecutionHandler.java | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) 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