Fix error introduced in #16681 (#16703)

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
This commit is contained in:
Gaël L'hopital 2024-04-29 18:23:47 +02:00 committed by GitHub
parent 57025ce961
commit 22e3d55f85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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);