[New] ExecutionHandler.getControllers() returns a List

This commit is contained in:
Robert von Burg 2022-01-26 12:55:59 +01:00
parent 7f84d81ca6
commit e8964fccb5
2 changed files with 5 additions and 4 deletions

View File

@ -45,11 +45,11 @@ public class EventBasedExecutionHandler extends ExecutionHandler {
}
@Override
public Collection<Controller> getControllers(String realm) {
public List<Controller> getControllers(String realm) {
Map<Locator, Controller> controllersByRealm = this.controllers.getMap(realm);
if (controllersByRealm == null)
return Collections.emptyList();
return controllersByRealm.values();
return new ArrayList<>();
return new ArrayList<>(controllersByRealm.values());
}
@Override

View File

@ -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<Controller> getControllers(String realm);
public abstract List<Controller> getControllers(String realm);
/**
* Returns the controller for the given realm and activity, null if it does not exist