Fix error introduced in #16681 (#16703)

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
Gaël L'hopital 2024-04-29 18:23:47 +02:00 committed by Ciprian Pascu
parent 7b4e383f72
commit 2479529eab
2 changed files with 3 additions and 3 deletions

View File

@ -43,8 +43,8 @@ public class HomeSecurityThingCapability extends Capability {
List<ChannelHelper> channelHelpers) {
super(handler);
this.descriptionProvider = descriptionProvider;
this.eventHelper = (EventChannelHelper) channelHelpers.stream().filter(c -> c instanceof EventChannelHelper)
.findFirst().orElseThrow(() -> new IllegalArgumentException(
this.eventHelper = channelHelpers.stream().filter(EventChannelHelper.class::isInstance)
.map(EventChannelHelper.class::cast).findFirst().orElseThrow(() -> new IllegalArgumentException(
"HomeSecurityThingCapability must find an EventChannelHelper, please file a bug report."));
eventHelper.setModuleType(moduleType);
}

View File

@ -30,7 +30,7 @@ import org.openhab.core.types.State;
*
*/
@NonNullByDefault
public class EventCameraChannelHelper extends ChannelHelper {
public class EventCameraChannelHelper extends EventChannelHelper {
public EventCameraChannelHelper(Set<String> providedGroups) {
super(providedGroups);