]> git.basschouten.com Git - openhab-addons.git/commitdiff
Fixed build by improve config handling (#12078)
authorChristoph Weitkamp <github@christophweitkamp.de>
Fri, 21 Jan 2022 13:04:43 +0000 (14:04 +0100)
committerGitHub <noreply@github.com>
Fri, 21 Jan 2022 13:04:43 +0000 (14:04 +0100)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/handler/HueBridgeHandler.java
itests/org.openhab.binding.modbus.tests/src/main/java/org/openhab/binding/modbus/tests/ModbusDataHandlerTest.java

index 6671be5dcbf83e29fced2cf13fd27925436e7736..3257fae32f82391c0bd4dfe0a83103a9e4560ee9 100644 (file)
@@ -1039,6 +1039,8 @@ public class HueBridgeHandler extends ConfigStatusBridgeHandler implements HueCl
     public Collection<ConfigStatusMessage> 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)
index 75fef14f355b55570fa189d8c3f709a1c828b569..4073bfdbbd8217b52ac3c5cbe2365fe9d3526aa9 100644 (file)
@@ -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)