We only have one controller on our buses, but make it a set anyway for clarity.

This commit is contained in:
Florian Nücke
2022-01-15 19:38:05 +01:00
parent 408dee3fbb
commit 0be9994bf7

View File

@@ -63,7 +63,7 @@ public abstract class AbstractDeviceBusElement implements DeviceBusElement {
@Override
public Collection<Device> getDevices() {
if (!controllers.isEmpty()) {
return controllers.stream().flatMap(controller -> getDevices().stream()).collect(Collectors.toList());
return controllers.stream().flatMap(controller -> getDevices().stream()).collect(Collectors.toSet());
} else {
return getLocalDevices();
}