From d8618a761a432dd567a9c74d281c0aab052f605e Mon Sep 17 00:00:00 2001 From: tl-photography Date: Mon, 13 Jan 2025 21:54:21 +0100 Subject: [PATCH] [shelly] Fix `NullPointerException` (#18103) Signed-off-by: Thomas Leber --- .../binding/shelly/internal/manager/ShellyManagerPage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/manager/ShellyManagerPage.java b/bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/manager/ShellyManagerPage.java index d63c0603e48..9456211c3f5 100644 --- a/bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/manager/ShellyManagerPage.java +++ b/bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/manager/ShellyManagerPage.java @@ -413,7 +413,7 @@ public class ShellyManagerPage { fw = fromJson(gson, entry, FwRepoEntry.class); // Special case: RGW2 has a split firmware - xxx-white.zip vs. xxx-color.zip - if (!mode.isEmpty() && deviceType.equalsIgnoreCase(SHELLYDT_RGBW2)) { + if (SHELLYDT_RGBW2.equalsIgnoreCase(deviceType) && !mode.isEmpty()) { // check for spilt firmware String url = substringBefore(fw.url, ".zip") + "-" + mode + ".zip"; if (testUrl(url)) {