Skip to content

Commit 22e3d55

Browse files
authored
Fix error introduced in openhab#16681 (openhab#16703)
Signed-off-by: Gaël L'hopital <[email protected]>
1 parent 57025ce commit 22e3d55

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bundles/org.openhab.binding.netatmo/src/main/java/org/openhab/binding/netatmo/internal/handler/capability/HomeSecurityThingCapability.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ public HomeSecurityThingCapability(CommonInterface handler, NetatmoDescriptionPr
4343
List<ChannelHelper> channelHelpers) {
4444
super(handler);
4545
this.descriptionProvider = descriptionProvider;
46-
this.eventHelper = (EventChannelHelper) channelHelpers.stream().filter(c -> c instanceof EventChannelHelper)
47-
.findFirst().orElseThrow(() -> new IllegalArgumentException(
46+
this.eventHelper = channelHelpers.stream().filter(EventChannelHelper.class::isInstance)
47+
.map(EventChannelHelper.class::cast).findFirst().orElseThrow(() -> new IllegalArgumentException(
4848
"HomeSecurityThingCapability must find an EventChannelHelper, please file a bug report."));
4949
eventHelper.setModuleType(moduleType);
5050
}

bundles/org.openhab.binding.netatmo/src/main/java/org/openhab/binding/netatmo/internal/handler/channelhelper/EventCameraChannelHelper.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*
3131
*/
3232
@NonNullByDefault
33-
public class EventCameraChannelHelper extends ChannelHelper {
33+
public class EventCameraChannelHelper extends EventChannelHelper {
3434

3535
public EventCameraChannelHelper(Set<String> providedGroups) {
3636
super(providedGroups);

0 commit comments

Comments
 (0)