From caa3359f534aa57c872de1d6715b78d0d3df3fd4 Mon Sep 17 00:00:00 2001 From: Christoph Weitkamp Date: Fri, 21 Jan 2022 14:04:43 +0100 Subject: [PATCH] Fixed build by improve config handling (#12078) Signed-off-by: Christoph Weitkamp --- .../binding/hue/internal/handler/HueBridgeHandler.java | 2 ++ .../openhab/binding/modbus/tests/ModbusDataHandlerTest.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/handler/HueBridgeHandler.java b/bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/handler/HueBridgeHandler.java index 6671be5dcbf..3257fae32f8 100644 --- a/bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/handler/HueBridgeHandler.java +++ b/bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/handler/HueBridgeHandler.java @@ -1039,6 +1039,8 @@ public class HueBridgeHandler extends ConfigStatusBridgeHandler implements HueCl public Collection getConfigStatus() { // The bridge IP address to be used for checks // Check whether an IP address is provided + hueBridgeConfig = getConfigAs(HueBridgeConfig.class); + String ip = hueBridgeConfig.getIpAddress(); if (ip == null || ip.isEmpty()) { return List.of(ConfigStatusMessage.Builder.error(HOST) diff --git a/itests/org.openhab.binding.modbus.tests/src/main/java/org/openhab/binding/modbus/tests/ModbusDataHandlerTest.java b/itests/org.openhab.binding.modbus.tests/src/main/java/org/openhab/binding/modbus/tests/ModbusDataHandlerTest.java index 75fef14f355..4073bfdbbd8 100644 --- a/itests/org.openhab.binding.modbus.tests/src/main/java/org/openhab/binding/modbus/tests/ModbusDataHandlerTest.java +++ b/itests/org.openhab.binding.modbus.tests/src/main/java/org/openhab/binding/modbus/tests/ModbusDataHandlerTest.java @@ -952,8 +952,8 @@ public class ModbusDataHandlerTest extends AbstractModbusOSGiTest { captureModbusWrites(); Configuration pollerConfig = new Configuration(); pollerConfig.put("refresh", 0L); // 0 -> non polling - pollerConfig.put("start", "2"); - pollerConfig.put("length", "3"); + pollerConfig.put("start", 2); + pollerConfig.put("length", 3); pollerConfig.put("type", ModbusBindingConstantsInternal.READ_TYPE_HOLDING_REGISTER); ThingUID pollerUID = new ThingUID(ModbusBindingConstantsInternal.THING_TYPE_MODBUS_POLLER, "realPoller"); Bridge poller = BridgeBuilder.create(ModbusBindingConstantsInternal.THING_TYPE_MODBUS_POLLER, pollerUID)