From 38c57cae3780704eb2c4e6253d683b0d3736e575 Mon Sep 17 00:00:00 2001 From: Holger Friedrich Date: Fri, 3 Jan 2025 20:38:35 +0100 Subject: [PATCH] tmp Signed-off-by: Holger Friedrich --- .../automation/internal/commands/AutomationCommandList.java | 2 +- .../core/io/rest/sitemap/SitemapSubscriptionService.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/commands/AutomationCommandList.java b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/commands/AutomationCommandList.java index a41a84f8d68..43333c06027 100644 --- a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/commands/AutomationCommandList.java +++ b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/commands/AutomationCommandList.java @@ -126,7 +126,7 @@ protected String parseOptionsAndParameters(String[] parameterValues) { } if (getLocale) { String l = parameterValue; - locale = new Locale(l); + locale = Locale.of(l); getLocale = false; } if (getId && getLocale) { diff --git a/bundles/org.openhab.core.io.rest.sitemap/src/main/java/org/openhab/core/io/rest/sitemap/SitemapSubscriptionService.java b/bundles/org.openhab.core.io.rest.sitemap/src/main/java/org/openhab/core/io/rest/sitemap/SitemapSubscriptionService.java index d7440501a67..a3d221127f3 100644 --- a/bundles/org.openhab.core.io.rest.sitemap/src/main/java/org/openhab/core/io/rest/sitemap/SitemapSubscriptionService.java +++ b/bundles/org.openhab.core.io.rest.sitemap/src/main/java/org/openhab/core/io/rest/sitemap/SitemapSubscriptionService.java @@ -300,8 +300,8 @@ public EList collectWidgets(String sitemapName, @Nullable String pageId) LinkedList childrenQueue = new LinkedList<>(widgets); while (!childrenQueue.isEmpty()) { Widget child = childrenQueue.removeFirst(); - if (child instanceof LinkableWidget) { - List subWidgets = itemUIRegistry.getChildren((LinkableWidget) child); + if (child instanceof LinkableWidget widget) { + List subWidgets = itemUIRegistry.getChildren(widget); widgets.addAll(subWidgets); childrenQueue.addAll(subWidgets); }