From 1e788675546a44221af920fb15f28fdb0ccecb7d Mon Sep 17 00:00:00 2001 From: Laurent Garnier Date: Wed, 6 Sep 2023 08:47:02 +0200 Subject: [PATCH] Avoid duplicating pattern Signed-off-by: Laurent Garnier --- .../ui/internal/components/UIComponentSitemapProvider.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bundles/org.openhab.core.ui/src/main/java/org/openhab/core/ui/internal/components/UIComponentSitemapProvider.java b/bundles/org.openhab.core.ui/src/main/java/org/openhab/core/ui/internal/components/UIComponentSitemapProvider.java index 8b313051b6a..6b1fd5ed371 100644 --- a/bundles/org.openhab.core.ui/src/main/java/org/openhab/core/ui/internal/components/UIComponentSitemapProvider.java +++ b/bundles/org.openhab.core.ui/src/main/java/org/openhab/core/ui/internal/components/UIComponentSitemapProvider.java @@ -93,8 +93,7 @@ public class UIComponentSitemapProvider implements SitemapProvider, RegistryChan .compile("(?[A-Za-z]\\w*)\\s*(?==|!=|<=|>=|<|>)\\s*(?\\+|-)?(?.+)"); private static final Pattern COLOR_PATTERN = Pattern.compile( "((?[A-Za-z]\\w*)?\\s*((?==|!=|<=|>=|<|>)\\s*(?\\+|-)?(?[^=]+))?\\s*=)?\\s*(?\\S+)"); - private static final Pattern ICON_PATTERN = Pattern.compile( - "((?[A-Za-z]\\w*)?\\s*((?==|!=|<=|>=|<|>)\\s*(?\\+|-)?(?[^=]+))?\\s*=)?\\s*(?\\S+)"); + private static final Pattern ICON_PATTERN = COLOR_PATTERN; private Map sitemaps = new HashMap<>(); private @Nullable UIComponentRegistryFactory componentRegistryFactory;