From aef57edd73de6f2cf4a76bc2aa3c2ed5b75a190a Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Mon, 14 Aug 2023 10:37:20 +0200 Subject: [PATCH 01/22] Use workaround to fix high CPU usage by LinkedTransferQueue (#3756) This is a workaround for JDK-8301341 by using the Java 11 LinkedTransferQueue with the QueueingThreadPoolExecutor in the Core and jUPnP. Signed-off-by: Wouter Born --- bom/compile/pom.xml | 11 ++++++++++- bom/runtime/pom.xml | 11 ++++++++++- .../core/common/QueueingThreadPoolExecutor.java | 2 +- .../karaf/openhab-core/src/main/feature/feature.xml | 1 + .../karaf/openhab-tp/src/main/feature/feature.xml | 3 ++- itests/org.openhab.core.addon.tests/itest.bndrun | 3 ++- .../itest.bndrun | 4 +++- .../itest.bndrun | 4 +++- .../itest.bndrun | 4 +++- .../itest.bndrun | 4 +++- .../itest.bndrun | 4 +++- itests/org.openhab.core.automation.tests/itest.bndrun | 4 +++- .../org.openhab.core.config.core.tests/itest.bndrun | 4 +++- .../itest.bndrun | 4 +++- .../itest.bndrun | 4 +++- .../itest.bndrun | 4 +++- .../itest.bndrun | 4 +++- .../itest.bndrun | 4 +++- itests/org.openhab.core.ephemeris.tests/itest.bndrun | 4 +++- itests/org.openhab.core.io.net.tests/itest.bndrun | 4 +++- .../org.openhab.core.io.rest.core.tests/itest.bndrun | 4 +++- itests/org.openhab.core.model.item.tests/itest.bndrun | 6 ++++-- itests/org.openhab.core.model.rule.tests/itest.bndrun | 5 ++++- .../org.openhab.core.model.script.tests/itest.bndrun | 5 +++-- .../org.openhab.core.model.thing.tests/itest.bndrun | 5 +++-- .../org.openhab.core.storage.json.tests/itest.bndrun | 4 +++- itests/org.openhab.core.tests/itest.bndrun | 4 +++- itests/org.openhab.core.thing.tests/itest.bndrun | 3 ++- itests/org.openhab.core.voice.tests/itest.bndrun | 3 ++- 29 files changed, 95 insertions(+), 31 deletions(-) diff --git a/bom/compile/pom.xml b/bom/compile/pom.xml index a5940ac6ecf..54f8b5f5af0 100644 --- a/bom/compile/pom.xml +++ b/bom/compile/pom.xml @@ -202,7 +202,8 @@ org.jupnp org.jupnp - 2.7.1 + + 2.7.1.OH1 compile @@ -436,6 +437,14 @@ 5.12.1 compile + + + + org.openhab + base-fixes + 1.0.0 + compile + diff --git a/bom/runtime/pom.xml b/bom/runtime/pom.xml index c883fb19883..a17459cd21a 100644 --- a/bom/runtime/pom.xml +++ b/bom/runtime/pom.xml @@ -469,7 +469,8 @@ org.jupnp org.jupnp - 2.7.1 + + 2.7.1.OH1 compile @@ -1090,6 +1091,14 @@ 5.12.1 compile + + + + org.openhab + base-fixes + 1.0.0 + compile + diff --git a/bundles/org.openhab.core/src/main/java/org/openhab/core/common/QueueingThreadPoolExecutor.java b/bundles/org.openhab.core/src/main/java/org/openhab/core/common/QueueingThreadPoolExecutor.java index bc71ab2068a..1da5f7dcdf3 100644 --- a/bundles/org.openhab.core/src/main/java/org/openhab/core/common/QueueingThreadPoolExecutor.java +++ b/bundles/org.openhab.core/src/main/java/org/openhab/core/common/QueueingThreadPoolExecutor.java @@ -13,7 +13,6 @@ package org.openhab.core.common; import java.util.concurrent.BlockingQueue; -import java.util.concurrent.LinkedTransferQueue; import java.util.concurrent.RejectedExecutionHandler; import java.util.concurrent.SynchronousQueue; import java.util.concurrent.ThreadFactory; @@ -24,6 +23,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.function.Consumer; +import org.openhab.basefixes.util.concurrent.LinkedTransferQueue; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/features/karaf/openhab-core/src/main/feature/feature.xml b/features/karaf/openhab-core/src/main/feature/feature.xml index 615a415ab7b..c64f864734c 100644 --- a/features/karaf/openhab-core/src/main/feature/feature.xml +++ b/features/karaf/openhab-core/src/main/feature/feature.xml @@ -40,6 +40,7 @@ openhab.tp;filter:="(feature=jna)" openhab.tp-jna + mvn:org.openhab/base-fixes/1.0.0 mvn:org.openhab.core.bundles/org.openhab.core.automation/${project.version} mvn:org.openhab.core.bundles/org.openhab.core.config.core/${project.version} mvn:org.openhab.core.bundles/org.openhab.core.config.discovery/${project.version} diff --git a/features/karaf/openhab-tp/src/main/feature/feature.xml b/features/karaf/openhab-tp/src/main/feature/feature.xml index ddbea330283..4f9460ad05f 100644 --- a/features/karaf/openhab-tp/src/main/feature/feature.xml +++ b/features/karaf/openhab-tp/src/main/feature/feature.xml @@ -212,7 +212,8 @@ http scr openhab.tp-httpclient - mvn:org.jupnp/org.jupnp/2.7.1 + mvn:org.openhab/base-fixes/1.0.0 + mvn:org.jupnp/org.jupnp/2.7.1.OH1 diff --git a/itests/org.openhab.core.addon.tests/itest.bndrun b/itests/org.openhab.core.addon.tests/itest.bndrun index 6bed7a950eb..6b48ac8a27c 100644 --- a/itests/org.openhab.core.addon.tests/itest.bndrun +++ b/itests/org.openhab.core.addon.tests/itest.bndrun @@ -60,4 +60,5 @@ Fragment-Host: org.openhab.core.addon org.openhab.core.addon;version='[4.1.0,4.1.1)',\ org.openhab.core.addon.tests;version='[4.1.0,4.1.1)',\ org.openhab.core.config.core;version='[4.1.0,4.1.1)',\ - org.openhab.core.test;version='[4.1.0,4.1.1)' + org.openhab.core.test;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)' diff --git a/itests/org.openhab.core.auth.oauth2client.tests/itest.bndrun b/itests/org.openhab.core.auth.oauth2client.tests/itest.bndrun index 4a4ce243c5d..aa66d13dd16 100644 --- a/itests/org.openhab.core.auth.oauth2client.tests/itest.bndrun +++ b/itests/org.openhab.core.auth.oauth2client.tests/itest.bndrun @@ -68,4 +68,6 @@ Fragment-Host: org.openhab.core.auth.oauth2client org.openhab.core.auth.oauth2client.tests;version='[4.1.0,4.1.1)',\ org.openhab.core.io.console;version='[4.1.0,4.1.1)',\ org.openhab.core.io.net;version='[4.1.0,4.1.1)',\ - org.openhab.core.test;version='[4.1.0,4.1.1)' + org.openhab.core.test;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + org.osgi.service.cm;version='[1.6.0,1.6.1)' diff --git a/itests/org.openhab.core.automation.integration.tests/itest.bndrun b/itests/org.openhab.core.automation.integration.tests/itest.bndrun index 7e0167eb827..144dab3b0cb 100644 --- a/itests/org.openhab.core.automation.integration.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.integration.tests/itest.bndrun @@ -66,4 +66,6 @@ Fragment-Host: org.openhab.core.automation org.openhab.core.io.console;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.core.thing;version='[4.1.0,4.1.1)',\ - org.openhab.core.transform;version='[4.1.0,4.1.1)' + org.openhab.core.transform;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + org.osgi.service.cm;version='[1.6.0,1.6.1)' diff --git a/itests/org.openhab.core.automation.module.core.tests/itest.bndrun b/itests/org.openhab.core.automation.module.core.tests/itest.bndrun index cf1fa0f01da..249f29b4359 100644 --- a/itests/org.openhab.core.automation.module.core.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.module.core.tests/itest.bndrun @@ -66,4 +66,6 @@ Fragment-Host: org.openhab.core.automation org.openhab.core.io.console;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.core.thing;version='[4.1.0,4.1.1)',\ - org.openhab.core.transform;version='[4.1.0,4.1.1)' + org.openhab.core.transform;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + org.osgi.service.cm;version='[1.6.0,1.6.1)' diff --git a/itests/org.openhab.core.automation.module.script.tests/itest.bndrun b/itests/org.openhab.core.automation.module.script.tests/itest.bndrun index a37ae6570a9..af8a495d68a 100644 --- a/itests/org.openhab.core.automation.module.script.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.module.script.tests/itest.bndrun @@ -63,4 +63,6 @@ Fragment-Host: org.openhab.core.automation.module.script org.openhab.core.io.console;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.core.thing;version='[4.1.0,4.1.1)',\ - org.openhab.core.transform;version='[4.1.0,4.1.1)' + org.openhab.core.transform;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + org.osgi.service.cm;version='[1.6.0,1.6.1)' diff --git a/itests/org.openhab.core.automation.module.timer.tests/itest.bndrun b/itests/org.openhab.core.automation.module.timer.tests/itest.bndrun index 002c12fc7be..6dd0913a1e6 100644 --- a/itests/org.openhab.core.automation.module.timer.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.module.timer.tests/itest.bndrun @@ -66,4 +66,6 @@ Fragment-Host: org.openhab.core.automation org.openhab.core.io.console;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.core.thing;version='[4.1.0,4.1.1)',\ - org.openhab.core.transform;version='[4.1.0,4.1.1)' + org.openhab.core.transform;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + org.osgi.service.cm;version='[1.6.0,1.6.1)' diff --git a/itests/org.openhab.core.automation.tests/itest.bndrun b/itests/org.openhab.core.automation.tests/itest.bndrun index dd9c25b98a1..ecd0ce801fe 100644 --- a/itests/org.openhab.core.automation.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.tests/itest.bndrun @@ -66,4 +66,6 @@ Fragment-Host: org.openhab.core.automation org.openhab.core.io.console;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.core.thing;version='[4.1.0,4.1.1)',\ - org.openhab.core.transform;version='[4.1.0,4.1.1)' + org.openhab.core.transform;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + org.osgi.service.cm;version='[1.6.0,1.6.1)' diff --git a/itests/org.openhab.core.config.core.tests/itest.bndrun b/itests/org.openhab.core.config.core.tests/itest.bndrun index 6b546af613e..53b88e4bfc3 100644 --- a/itests/org.openhab.core.config.core.tests/itest.bndrun +++ b/itests/org.openhab.core.config.core.tests/itest.bndrun @@ -61,4 +61,6 @@ Fragment-Host: org.openhab.core.config.core org.openhab.core;version='[4.1.0,4.1.1)',\ org.openhab.core.config.core;version='[4.1.0,4.1.1)',\ org.openhab.core.config.core.tests;version='[4.1.0,4.1.1)',\ - org.openhab.core.test;version='[4.1.0,4.1.1)' + org.openhab.core.test;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + org.osgi.service.cm;version='[1.6.0,1.6.1)' diff --git a/itests/org.openhab.core.config.discovery.mdns.tests/itest.bndrun b/itests/org.openhab.core.config.discovery.mdns.tests/itest.bndrun index 9c56f25b3c3..660e7c8a32d 100644 --- a/itests/org.openhab.core.config.discovery.mdns.tests/itest.bndrun +++ b/itests/org.openhab.core.config.discovery.mdns.tests/itest.bndrun @@ -66,4 +66,6 @@ Fragment-Host: org.openhab.core.config.discovery.mdns org.openhab.core.io.transport.mdns;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.core.thing;version='[4.1.0,4.1.1)',\ - org.openhab.core.transform;version='[4.1.0,4.1.1)' + org.openhab.core.transform;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + org.osgi.service.cm;version='[1.6.0,1.6.1)' diff --git a/itests/org.openhab.core.config.discovery.tests/itest.bndrun b/itests/org.openhab.core.config.discovery.tests/itest.bndrun index 2c9765d125e..f1b8c437517 100644 --- a/itests/org.openhab.core.config.discovery.tests/itest.bndrun +++ b/itests/org.openhab.core.config.discovery.tests/itest.bndrun @@ -65,4 +65,6 @@ Fragment-Host: org.openhab.core.config.discovery org.openhab.core.io.console;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.core.thing;version='[4.1.0,4.1.1)',\ - org.openhab.core.transform;version='[4.1.0,4.1.1)' + org.openhab.core.transform;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + org.osgi.service.cm;version='[1.6.0,1.6.1)' diff --git a/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/itest.bndrun b/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/itest.bndrun index 272f51848c9..8ef16286b5f 100644 --- a/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/itest.bndrun +++ b/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/itest.bndrun @@ -66,4 +66,6 @@ Fragment-Host: org.openhab.core.config.discovery.usbserial.linuxsysfs org.openhab.core.io.console;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.core.thing;version='[4.1.0,4.1.1)',\ - org.openhab.core.transform;version='[4.1.0,4.1.1)' + org.openhab.core.transform;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + org.osgi.service.cm;version='[1.6.0,1.6.1)' diff --git a/itests/org.openhab.core.config.discovery.usbserial.tests/itest.bndrun b/itests/org.openhab.core.config.discovery.usbserial.tests/itest.bndrun index a0f6bff136f..fa053964cba 100644 --- a/itests/org.openhab.core.config.discovery.usbserial.tests/itest.bndrun +++ b/itests/org.openhab.core.config.discovery.usbserial.tests/itest.bndrun @@ -74,4 +74,6 @@ Provide-Capability: \ org.openhab.core.io.console;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.core.thing;version='[4.1.0,4.1.1)',\ - org.openhab.core.transform;version='[4.1.0,4.1.1)' + org.openhab.core.transform;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + org.osgi.service.cm;version='[1.6.0,1.6.1)' diff --git a/itests/org.openhab.core.config.dispatch.tests/itest.bndrun b/itests/org.openhab.core.config.dispatch.tests/itest.bndrun index 041c09e5e18..4d720adb4c4 100644 --- a/itests/org.openhab.core.config.dispatch.tests/itest.bndrun +++ b/itests/org.openhab.core.config.dispatch.tests/itest.bndrun @@ -54,4 +54,6 @@ Fragment-Host: org.openhab.core.config.dispatch org.openhab.core;version='[4.1.0,4.1.1)',\ org.openhab.core.config.dispatch;version='[4.1.0,4.1.1)',\ org.openhab.core.config.dispatch.tests;version='[4.1.0,4.1.1)',\ - org.openhab.core.test;version='[4.1.0,4.1.1)' + org.openhab.core.test;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + org.osgi.service.cm;version='[1.6.0,1.6.1)' diff --git a/itests/org.openhab.core.ephemeris.tests/itest.bndrun b/itests/org.openhab.core.ephemeris.tests/itest.bndrun index 6eccdf29ad2..6a02c504517 100644 --- a/itests/org.openhab.core.ephemeris.tests/itest.bndrun +++ b/itests/org.openhab.core.ephemeris.tests/itest.bndrun @@ -63,4 +63,6 @@ feature.openhab-config: \ org.openhab.core.config.core;version='[4.1.0,4.1.1)',\ org.openhab.core.ephemeris;version='[4.1.0,4.1.1)',\ org.openhab.core.ephemeris.tests;version='[4.1.0,4.1.1)',\ - org.openhab.core.test;version='[4.1.0,4.1.1)' + org.openhab.core.test;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + org.osgi.service.cm;version='[1.6.0,1.6.1)' diff --git a/itests/org.openhab.core.io.net.tests/itest.bndrun b/itests/org.openhab.core.io.net.tests/itest.bndrun index d091b905e59..0eaf7dd727e 100644 --- a/itests/org.openhab.core.io.net.tests/itest.bndrun +++ b/itests/org.openhab.core.io.net.tests/itest.bndrun @@ -72,4 +72,6 @@ Fragment-Host: org.openhab.core.io.net org.openhab.core;version='[4.1.0,4.1.1)',\ org.openhab.core.io.net;version='[4.1.0,4.1.1)',\ org.openhab.core.io.net.tests;version='[4.1.0,4.1.1)',\ - org.openhab.core.test;version='[4.1.0,4.1.1)' + org.openhab.core.test;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + org.osgi.service.cm;version='[1.6.0,1.6.1)' diff --git a/itests/org.openhab.core.io.rest.core.tests/itest.bndrun b/itests/org.openhab.core.io.rest.core.tests/itest.bndrun index 8d7c0e47cad..ae97d588564 100644 --- a/itests/org.openhab.core.io.rest.core.tests/itest.bndrun +++ b/itests/org.openhab.core.io.rest.core.tests/itest.bndrun @@ -106,4 +106,6 @@ Fragment-Host: org.openhab.core.io.rest.core org.openhab.core.semantics;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.core.thing;version='[4.1.0,4.1.1)',\ - org.openhab.core.transform;version='[4.1.0,4.1.1)' + org.openhab.core.transform;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + org.osgi.service.cm;version='[1.6.0,1.6.1)' diff --git a/itests/org.openhab.core.model.item.tests/itest.bndrun b/itests/org.openhab.core.model.item.tests/itest.bndrun index e1bf65fd265..7178a6b927a 100644 --- a/itests/org.openhab.core.model.item.tests/itest.bndrun +++ b/itests/org.openhab.core.model.item.tests/itest.bndrun @@ -104,7 +104,6 @@ Fragment-Host: org.openhab.core.model.item org.openhab.core.model.item.tests;version='[4.1.0,4.1.1)',\ org.openhab.core.model.persistence;version='[4.1.0,4.1.1)',\ org.openhab.core.model.rule;version='[4.1.0,4.1.1)',\ - org.openhab.core.model.rule.runtime;version='[4.1.0,4.1.1)',\ org.openhab.core.model.script;version='[4.1.0,4.1.1)',\ org.openhab.core.model.script.runtime;version='[4.1.0,4.1.1)',\ org.openhab.core.model.sitemap;version='[4.1.0,4.1.1)',\ @@ -114,4 +113,7 @@ Fragment-Host: org.openhab.core.model.item org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ - org.openhab.core.voice;version='[4.1.0,4.1.1)' + org.openhab.core.voice;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + org.openhab.core.model.thing.runtime;version='[4.1.0,4.1.1)',\ + org.osgi.service.cm;version='[1.6.0,1.6.1)' diff --git a/itests/org.openhab.core.model.rule.tests/itest.bndrun b/itests/org.openhab.core.model.rule.tests/itest.bndrun index cf58e39a8ab..b668c453207 100644 --- a/itests/org.openhab.core.model.rule.tests/itest.bndrun +++ b/itests/org.openhab.core.model.rule.tests/itest.bndrun @@ -117,4 +117,7 @@ Fragment-Host: org.openhab.core.model.rule.runtime org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ - org.openhab.core.voice;version='[4.1.0,4.1.1)' + org.openhab.core.voice;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + org.openhab.core.model.thing.runtime;version='[4.1.0,4.1.1)',\ + org.osgi.service.cm;version='[1.6.0,1.6.1)' diff --git a/itests/org.openhab.core.model.script.tests/itest.bndrun b/itests/org.openhab.core.model.script.tests/itest.bndrun index a76292b3714..b278764476d 100644 --- a/itests/org.openhab.core.model.script.tests/itest.bndrun +++ b/itests/org.openhab.core.model.script.tests/itest.bndrun @@ -110,7 +110,6 @@ Fragment-Host: org.openhab.core.model.script org.openhab.core.model.item;version='[4.1.0,4.1.1)',\ org.openhab.core.model.persistence;version='[4.1.0,4.1.1)',\ org.openhab.core.model.rule;version='[4.1.0,4.1.1)',\ - org.openhab.core.model.rule.runtime;version='[4.1.0,4.1.1)',\ org.openhab.core.model.script;version='[4.1.0,4.1.1)',\ org.openhab.core.model.script.runtime;version='[4.1.0,4.1.1)',\ org.openhab.core.model.script.tests;version='[4.1.0,4.1.1)',\ @@ -121,4 +120,6 @@ Fragment-Host: org.openhab.core.model.script org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ - org.openhab.core.voice;version='[4.1.0,4.1.1)' + org.openhab.core.voice;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + org.openhab.core.model.thing.runtime;version='[4.1.0,4.1.1)' diff --git a/itests/org.openhab.core.model.thing.tests/itest.bndrun b/itests/org.openhab.core.model.thing.tests/itest.bndrun index 6fc4089479e..8de4af86738 100644 --- a/itests/org.openhab.core.model.thing.tests/itest.bndrun +++ b/itests/org.openhab.core.model.thing.tests/itest.bndrun @@ -110,7 +110,6 @@ Fragment-Host: org.openhab.core.model.thing org.openhab.core.model.item.runtime;version='[4.1.0,4.1.1)',\ org.openhab.core.model.persistence;version='[4.1.0,4.1.1)',\ org.openhab.core.model.rule;version='[4.1.0,4.1.1)',\ - org.openhab.core.model.rule.runtime;version='[4.1.0,4.1.1)',\ org.openhab.core.model.script;version='[4.1.0,4.1.1)',\ org.openhab.core.model.script.runtime;version='[4.1.0,4.1.1)',\ org.openhab.core.model.sitemap;version='[4.1.0,4.1.1)',\ @@ -123,4 +122,6 @@ Fragment-Host: org.openhab.core.model.thing org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ - org.openhab.core.voice;version='[4.1.0,4.1.1)' + org.openhab.core.voice;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + org.osgi.service.cm;version='[1.6.0,1.6.1)' diff --git a/itests/org.openhab.core.storage.json.tests/itest.bndrun b/itests/org.openhab.core.storage.json.tests/itest.bndrun index ecafe773e10..4e75aaf5f13 100644 --- a/itests/org.openhab.core.storage.json.tests/itest.bndrun +++ b/itests/org.openhab.core.storage.json.tests/itest.bndrun @@ -59,4 +59,6 @@ Fragment-Host: org.openhab.core.storage.json org.openhab.core.storage.json.tests;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.core.thing;version='[4.1.0,4.1.1)',\ - org.openhab.core.transform;version='[4.1.0,4.1.1)' + org.openhab.core.transform;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + org.osgi.service.cm;version='[1.6.0,1.6.1)' diff --git a/itests/org.openhab.core.tests/itest.bndrun b/itests/org.openhab.core.tests/itest.bndrun index 45bafe3586c..c39489581df 100644 --- a/itests/org.openhab.core.tests/itest.bndrun +++ b/itests/org.openhab.core.tests/itest.bndrun @@ -58,4 +58,6 @@ Fragment-Host: org.openhab.core org.objenesis;version='[3.3.0,3.3.1)',\ org.openhab.core;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ - org.openhab.core.tests;version='[4.1.0,4.1.1)' + org.openhab.core.tests;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + org.osgi.service.cm;version='[1.6.0,1.6.1)' diff --git a/itests/org.openhab.core.thing.tests/itest.bndrun b/itests/org.openhab.core.thing.tests/itest.bndrun index 85765748f4d..407c7de4c2a 100644 --- a/itests/org.openhab.core.thing.tests/itest.bndrun +++ b/itests/org.openhab.core.thing.tests/itest.bndrun @@ -67,4 +67,5 @@ Fragment-Host: org.openhab.core.thing org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.thing.tests;version='[4.1.0,4.1.1)',\ - org.openhab.core.transform;version='[4.1.0,4.1.1)' + org.openhab.core.transform;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)' diff --git a/itests/org.openhab.core.voice.tests/itest.bndrun b/itests/org.openhab.core.voice.tests/itest.bndrun index 334784caa5c..e50ed771a88 100644 --- a/itests/org.openhab.core.voice.tests/itest.bndrun +++ b/itests/org.openhab.core.voice.tests/itest.bndrun @@ -72,4 +72,5 @@ Fragment-Host: org.openhab.core.voice org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.core.voice;version='[4.1.0,4.1.1)',\ - org.openhab.core.voice.tests;version='[4.1.0,4.1.1)' + org.openhab.core.voice.tests;version='[4.1.0,4.1.1)',\ + org.openhab.base-fixes;version='[1.0.0,1.0.1)' From 5f8658d0aeaa2ff68379245294a4fa40d3141198 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Wed, 16 Aug 2023 17:48:09 +0200 Subject: [PATCH 02/22] [REST] Check a label is provided when creating a new semantic tag (#3734) Signed-off-by: Laurent Garnier --- .../core/io/rest/core/internal/tag/TagResource.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.core.io.rest.core/src/main/java/org/openhab/core/io/rest/core/internal/tag/TagResource.java b/bundles/org.openhab.core.io.rest.core/src/main/java/org/openhab/core/io/rest/core/internal/tag/TagResource.java index cc4d558b47e..4e97419e0d9 100644 --- a/bundles/org.openhab.core.io.rest.core/src/main/java/org/openhab/core/io/rest/core/internal/tag/TagResource.java +++ b/bundles/org.openhab.core.io.rest.core/src/main/java/org/openhab/core/io/rest/core/internal/tag/TagResource.java @@ -189,16 +189,19 @@ public Response getTagAndSubTags(final @Context Request request, @Operation(operationId = "createSemanticTag", summary = "Creates a new semantic tag and adds it to the registry.", security = { @SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = { @ApiResponse(responseCode = "201", description = "Created", content = @Content(schema = @Schema(implementation = EnrichedSemanticTagDTO.class))), - @ApiResponse(responseCode = "400", description = "The tag identifier is invalid."), + @ApiResponse(responseCode = "400", description = "The tag identifier is invalid or the tag label is missing."), @ApiResponse(responseCode = "409", description = "A tag with the same identifier already exists.") }) public Response create( @HeaderParam(HttpHeaders.ACCEPT_LANGUAGE) @Parameter(description = "language") @Nullable String language, @Parameter(description = "tag data", required = true) EnrichedSemanticTagDTO data) { final Locale locale = localeService.getLocale(language); - if (data.uid == null) { + if (data.uid == null || data.uid.isBlank()) { return JSONResponse.createErrorResponse(Status.BAD_REQUEST, "Tag identifier is required!"); } + if (data.label == null || data.label.isBlank()) { + return JSONResponse.createErrorResponse(Status.BAD_REQUEST, "Tag label is required!"); + } String uid = data.uid.trim(); From 04eb32185c2cf5eabc84cc2b28d5688af89cdd3a Mon Sep 17 00:00:00 2001 From: J-N-K Date: Fri, 18 Aug 2023 21:38:43 +0200 Subject: [PATCH 03/22] Bump UoM libraries to 2.2 (#3758) Signed-off-by: Jan N. Klug --- bom/compile/pom.xml | 4 ++-- bom/runtime/pom.xml | 4 ++-- .../org/openhab/core/library/unit/UnitsTest.java | 5 +++-- .../karaf/openhab-tp/src/main/feature/feature.xml | 7 ++++--- itests/org.openhab.core.addon.tests/itest.bndrun | 10 +++++----- .../itest.bndrun | 10 +++++----- .../itest.bndrun | 10 +++++----- .../itest.bndrun | 10 +++++----- .../itest.bndrun | 10 +++++----- .../itest.bndrun | 10 +++++----- .../org.openhab.core.automation.tests/itest.bndrun | 10 +++++----- .../org.openhab.core.config.core.tests/itest.bndrun | 10 +++++----- .../itest.bndrun | 10 +++++----- .../itest.bndrun | 10 +++++----- .../itest.bndrun | 10 +++++----- .../itest.bndrun | 10 +++++----- .../itest.bndrun | 10 +++++----- .../org.openhab.core.ephemeris.tests/itest.bndrun | 10 +++++----- itests/org.openhab.core.io.net.tests/itest.bndrun | 10 +++++----- .../itest.bndrun | 10 +++++----- .../org.openhab.core.model.item.tests/itest.bndrun | 13 ++++++------- .../org.openhab.core.model.rule.tests/itest.bndrun | 12 ++++++------ .../itest.bndrun | 10 +++++----- .../org.openhab.core.model.thing.tests/itest.bndrun | 12 ++++++------ .../itest.bndrun | 10 +++++----- itests/org.openhab.core.tests/itest.bndrun | 10 +++++----- itests/org.openhab.core.thing.tests/itest.bndrun | 10 +++++----- itests/org.openhab.core.voice.tests/itest.bndrun | 10 +++++----- tools/upgradetool/pom.xml | 4 ++-- 29 files changed, 136 insertions(+), 135 deletions(-) diff --git a/bom/compile/pom.xml b/bom/compile/pom.xml index 54f8b5f5af0..e8955e19315 100644 --- a/bom/compile/pom.xml +++ b/bom/compile/pom.xml @@ -213,7 +213,7 @@ javax.measure unit-api - 2.1.3 + 2.2 compile @@ -225,7 +225,7 @@ tech.units indriya - 2.1.2 + 2.2 compile diff --git a/bom/runtime/pom.xml b/bom/runtime/pom.xml index a17459cd21a..c57e8c15cc6 100644 --- a/bom/runtime/pom.xml +++ b/bom/runtime/pom.xml @@ -490,7 +490,7 @@ javax.measure unit-api - 2.1.2 + 2.2 compile @@ -509,7 +509,7 @@ tech.units indriya - 2.1.2 + 2.2 compile diff --git a/bundles/org.openhab.core/src/test/java/org/openhab/core/library/unit/UnitsTest.java b/bundles/org.openhab.core/src/test/java/org/openhab/core/library/unit/UnitsTest.java index 95264a56ac0..60f85afcfac 100644 --- a/bundles/org.openhab.core/src/test/java/org/openhab/core/library/unit/UnitsTest.java +++ b/bundles/org.openhab.core/src/test/java/org/openhab/core/library/unit/UnitsTest.java @@ -136,8 +136,9 @@ public void testHpaUnitSymbol() { public void testKelvin2Fahrenheit() { Quantity kelvin = Quantities.getQuantity(BigDecimal.ZERO, Units.KELVIN); - assertThat(kelvin.to(ImperialUnits.FAHRENHEIT), - is(Quantities.getQuantity(new BigDecimal("-459.67"), ImperialUnits.FAHRENHEIT))); + assertThat(kelvin.to(ImperialUnits.FAHRENHEIT).getValue().doubleValue(), is(closeTo( + Quantities.getQuantity(new BigDecimal("-459.67"), ImperialUnits.FAHRENHEIT).getValue().doubleValue(), + 0.01))); } @Test diff --git a/features/karaf/openhab-tp/src/main/feature/feature.xml b/features/karaf/openhab-tp/src/main/feature/feature.xml index 4f9460ad05f..a5b9ad7a9d5 100644 --- a/features/karaf/openhab-tp/src/main/feature/feature.xml +++ b/features/karaf/openhab-tp/src/main/feature/feature.xml @@ -28,12 +28,13 @@ mvn:jakarta.annotation/jakarta.annotation-api/2.0.0 mvn:jakarta.inject/jakarta.inject-api/2.0.0 - mvn:javax.measure/unit-api/2.1.3 + mvn:javax.measure/unit-api/2.2 mvn:org.openhab.osgiify/si.uom.si-units/2.1 mvn:si.uom/si-quantity/2.1 - mvn:tech.units/indriya/2.1.2 - mvn:tech.uom.lib/uom-lib-common/2.1 + mvn:tech.units/indriya/2.2 + mvn:tech.uom.lib/uom-lib-common/2.2 + mvn:org.apiguardian/apiguardian-api/1.1.2 mvn:com.thoughtworks.xstream/xstream/1.4.20 diff --git a/itests/org.openhab.core.addon.tests/itest.bndrun b/itests/org.openhab.core.addon.tests/itest.bndrun index 6b48ac8a27c..98e21bbbafc 100644 --- a/itests/org.openhab.core.addon.tests/itest.bndrun +++ b/itests/org.openhab.core.addon.tests/itest.bndrun @@ -22,12 +22,8 @@ Fragment-Host: org.openhab.core.addon jakarta.xml.bind-api;version='[2.3.3,2.3.4)',\ org.apache.servicemix.specs.activation-api-1.2.1;version='[1.2.1,1.2.2)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -61,4 +57,8 @@ Fragment-Host: org.openhab.core.addon org.openhab.core.addon.tests;version='[4.1.0,4.1.1)',\ org.openhab.core.config.core;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ - org.openhab.base-fixes;version='[1.0.0,1.0.1)' + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.auth.oauth2client.tests/itest.bndrun b/itests/org.openhab.core.auth.oauth2client.tests/itest.bndrun index aa66d13dd16..035e305e7a9 100644 --- a/itests/org.openhab.core.auth.oauth2client.tests/itest.bndrun +++ b/itests/org.openhab.core.auth.oauth2client.tests/itest.bndrun @@ -18,12 +18,8 @@ Fragment-Host: org.openhab.core.auth.oauth2client jakarta.xml.bind-api;version='[2.3.3,2.3.4)',\ org.apache.servicemix.specs.activation-api-1.2.1;version='[1.2.1,1.2.2)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -70,4 +66,8 @@ Fragment-Host: org.openhab.core.auth.oauth2client org.openhab.core.io.net;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)' + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.automation.integration.tests/itest.bndrun b/itests/org.openhab.core.automation.integration.tests/itest.bndrun index 144dab3b0cb..ca830f97013 100644 --- a/itests/org.openhab.core.automation.integration.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.integration.tests/itest.bndrun @@ -20,12 +20,8 @@ Fragment-Host: org.openhab.core.automation jollyday;version='[0.5.10,0.5.11)',\ org.threeten.extra;version='[1.5.0,1.5.1)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -68,4 +64,8 @@ Fragment-Host: org.openhab.core.automation org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)' + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.automation.module.core.tests/itest.bndrun b/itests/org.openhab.core.automation.module.core.tests/itest.bndrun index 249f29b4359..d7e12f4fc05 100644 --- a/itests/org.openhab.core.automation.module.core.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.module.core.tests/itest.bndrun @@ -20,12 +20,8 @@ Fragment-Host: org.openhab.core.automation jollyday;version='[0.5.10,0.5.11)',\ org.threeten.extra;version='[1.5.0,1.5.1)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -68,4 +64,8 @@ Fragment-Host: org.openhab.core.automation org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)' + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.automation.module.script.tests/itest.bndrun b/itests/org.openhab.core.automation.module.script.tests/itest.bndrun index af8a495d68a..cd8fd51a20b 100644 --- a/itests/org.openhab.core.automation.module.script.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.module.script.tests/itest.bndrun @@ -20,12 +20,8 @@ Fragment-Host: org.openhab.core.automation.module.script jollyday;version='[0.5.10,0.5.11)',\ org.threeten.extra;version='[1.5.0,1.5.1)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -65,4 +61,8 @@ Fragment-Host: org.openhab.core.automation.module.script org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)' + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.automation.module.timer.tests/itest.bndrun b/itests/org.openhab.core.automation.module.timer.tests/itest.bndrun index 6dd0913a1e6..1419752a776 100644 --- a/itests/org.openhab.core.automation.module.timer.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.module.timer.tests/itest.bndrun @@ -20,12 +20,8 @@ Fragment-Host: org.openhab.core.automation jollyday;version='[0.5.10,0.5.11)',\ org.threeten.extra;version='[1.5.0,1.5.1)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -68,4 +64,8 @@ Fragment-Host: org.openhab.core.automation org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)' + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.automation.tests/itest.bndrun b/itests/org.openhab.core.automation.tests/itest.bndrun index ecd0ce801fe..3123d519255 100644 --- a/itests/org.openhab.core.automation.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.tests/itest.bndrun @@ -20,12 +20,8 @@ Fragment-Host: org.openhab.core.automation jollyday;version='[0.5.10,0.5.11)',\ org.threeten.extra;version='[1.5.0,1.5.1)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -68,4 +64,8 @@ Fragment-Host: org.openhab.core.automation org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)' + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.config.core.tests/itest.bndrun b/itests/org.openhab.core.config.core.tests/itest.bndrun index 53b88e4bfc3..90022058c33 100644 --- a/itests/org.openhab.core.config.core.tests/itest.bndrun +++ b/itests/org.openhab.core.config.core.tests/itest.bndrun @@ -19,12 +19,8 @@ Fragment-Host: org.openhab.core.config.core jakarta.xml.bind-api;version='[2.3.3,2.3.4)',\ org.apache.servicemix.specs.activation-api-1.2.1;version='[1.2.1,1.2.2)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -63,4 +59,8 @@ Fragment-Host: org.openhab.core.config.core org.openhab.core.config.core.tests;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)' + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.config.discovery.mdns.tests/itest.bndrun b/itests/org.openhab.core.config.discovery.mdns.tests/itest.bndrun index 660e7c8a32d..e4aeba2bbbd 100644 --- a/itests/org.openhab.core.config.discovery.mdns.tests/itest.bndrun +++ b/itests/org.openhab.core.config.discovery.mdns.tests/itest.bndrun @@ -18,12 +18,8 @@ Fragment-Host: org.openhab.core.config.discovery.mdns jakarta.xml.bind-api;version='[2.3.3,2.3.4)',\ org.apache.servicemix.specs.activation-api-1.2.1;version='[1.2.1,1.2.2)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -68,4 +64,8 @@ Fragment-Host: org.openhab.core.config.discovery.mdns org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)' + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.config.discovery.tests/itest.bndrun b/itests/org.openhab.core.config.discovery.tests/itest.bndrun index f1b8c437517..de5f18bdaf3 100644 --- a/itests/org.openhab.core.config.discovery.tests/itest.bndrun +++ b/itests/org.openhab.core.config.discovery.tests/itest.bndrun @@ -19,12 +19,8 @@ Fragment-Host: org.openhab.core.config.discovery jakarta.xml.bind-api;version='[2.3.3,2.3.4)',\ org.apache.servicemix.specs.activation-api-1.2.1;version='[1.2.1,1.2.2)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -67,4 +63,8 @@ Fragment-Host: org.openhab.core.config.discovery org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)' + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/itest.bndrun b/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/itest.bndrun index 8ef16286b5f..13952018bf5 100644 --- a/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/itest.bndrun +++ b/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/itest.bndrun @@ -18,12 +18,8 @@ Fragment-Host: org.openhab.core.config.discovery.usbserial.linuxsysfs jakarta.xml.bind-api;version='[2.3.3,2.3.4)',\ org.apache.servicemix.specs.activation-api-1.2.1;version='[1.2.1,1.2.2)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -68,4 +64,8 @@ Fragment-Host: org.openhab.core.config.discovery.usbserial.linuxsysfs org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)' + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.config.discovery.usbserial.tests/itest.bndrun b/itests/org.openhab.core.config.discovery.usbserial.tests/itest.bndrun index fa053964cba..5e745ef04a3 100644 --- a/itests/org.openhab.core.config.discovery.usbserial.tests/itest.bndrun +++ b/itests/org.openhab.core.config.discovery.usbserial.tests/itest.bndrun @@ -28,12 +28,8 @@ Provide-Capability: \ jakarta.xml.bind-api;version='[2.3.3,2.3.4)',\ org.apache.servicemix.specs.activation-api-1.2.1;version='[1.2.1,1.2.2)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -76,4 +72,8 @@ Provide-Capability: \ org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)' + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.config.dispatch.tests/itest.bndrun b/itests/org.openhab.core.config.dispatch.tests/itest.bndrun index 4d720adb4c4..2dc72fb519b 100644 --- a/itests/org.openhab.core.config.dispatch.tests/itest.bndrun +++ b/itests/org.openhab.core.config.dispatch.tests/itest.bndrun @@ -18,12 +18,8 @@ Fragment-Host: org.openhab.core.config.dispatch jakarta.xml.bind-api;version='[2.3.3,2.3.4)',\ org.apache.servicemix.specs.activation-api-1.2.1;version='[1.2.1,1.2.2)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -56,4 +52,8 @@ Fragment-Host: org.openhab.core.config.dispatch org.openhab.core.config.dispatch.tests;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)' + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.ephemeris.tests/itest.bndrun b/itests/org.openhab.core.ephemeris.tests/itest.bndrun index 6a02c504517..0a2c477d20a 100644 --- a/itests/org.openhab.core.ephemeris.tests/itest.bndrun +++ b/itests/org.openhab.core.ephemeris.tests/itest.bndrun @@ -25,12 +25,8 @@ feature.openhab-config: \ jollyday;version='[0.5.10,0.5.11)',\ org.threeten.extra;version='[1.5.0,1.5.1)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -65,4 +61,8 @@ feature.openhab-config: \ org.openhab.core.ephemeris.tests;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)' + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.io.net.tests/itest.bndrun b/itests/org.openhab.core.io.net.tests/itest.bndrun index 0eaf7dd727e..58716867e0e 100644 --- a/itests/org.openhab.core.io.net.tests/itest.bndrun +++ b/itests/org.openhab.core.io.net.tests/itest.bndrun @@ -17,10 +17,8 @@ Fragment-Host: org.openhab.core.io.net com.sun.jna;version='[5.12.1,5.12.2)',\ com.sun.xml.bind.jaxb-osgi;version='[2.3.3,2.3.4)',\ io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ jakarta.xml.bind-api;version='[2.3.3,2.3.4)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ junit-jupiter-api;version='[5.9.2,5.9.3)',\ junit-jupiter-engine;version='[5.9.2,5.9.3)',\ junit-platform-commons;version='[1.9.2,1.9.3)',\ @@ -58,8 +56,6 @@ Fragment-Host: org.openhab.core.io.net org.osgi.util.promise;version='[1.2.0,1.2.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ org.eclipse.jetty.http2.server;version='[9.4.50,9.4.51)',\ org.eclipse.jetty.websocket.servlet;version='[9.4.50,9.4.51)',\ org.eclipse.jetty.websocket.server;version='[9.4.50,9.4.51)',\ @@ -74,4 +70,8 @@ Fragment-Host: org.openhab.core.io.net org.openhab.core.io.net.tests;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)' + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.io.rest.core.tests/itest.bndrun b/itests/org.openhab.core.io.rest.core.tests/itest.bndrun index ae97d588564..6e9677460ac 100644 --- a/itests/org.openhab.core.io.rest.core.tests/itest.bndrun +++ b/itests/org.openhab.core.io.rest.core.tests/itest.bndrun @@ -33,12 +33,8 @@ Fragment-Host: org.openhab.core.io.rest.core org.apache.aries.component-dsl.component-dsl;version='[1.2.2,1.2.3)',\ org.apache.ws.xmlschema.core;version='[2.2.5,2.2.6)',\ stax2-api;version='[4.2.1,4.2.2)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ org.apache.cxf.cxf-core;version='[3.4.5,3.4.6)',\ org.apache.cxf.cxf-rt-frontend-jaxrs;version='[3.4.5,3.4.6)',\ org.apache.cxf.cxf-rt-rs-client;version='[3.4.5,3.4.6)',\ @@ -108,4 +104,8 @@ Fragment-Host: org.openhab.core.io.rest.core org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)' + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.model.item.tests/itest.bndrun b/itests/org.openhab.core.model.item.tests/itest.bndrun index 7178a6b927a..0213525638a 100644 --- a/itests/org.openhab.core.model.item.tests/itest.bndrun +++ b/itests/org.openhab.core.model.item.tests/itest.bndrun @@ -30,11 +30,7 @@ Fragment-Host: org.openhab.core.model.item org.eclipse.emf.ecore.xmi;version='[2.16.0,2.16.1)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ com.google.guava;version='[30.1.0,30.1.1)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -82,7 +78,6 @@ Fragment-Host: org.openhab.core.model.item org.eclipse.jetty.http2.client;version='[9.4.50,9.4.51)',\ org.eclipse.jetty.http2.common;version='[9.4.50,9.4.51)',\ org.eclipse.jetty.http2.hpack;version='[9.4.50,9.4.51)',\ - org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ xstream;version='[1.4.20,1.4.21)',\ junit-jupiter-api;version='[5.9.2,5.9.3)',\ junit-jupiter-engine;version='[5.9.2,5.9.3)',\ @@ -115,5 +110,9 @@ Fragment-Host: org.openhab.core.model.item org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.core.voice;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.openhab.core.model.thing.runtime;version='[4.1.0,4.1.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)' + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.model.rule.tests/itest.bndrun b/itests/org.openhab.core.model.rule.tests/itest.bndrun index b668c453207..e1dba991d28 100644 --- a/itests/org.openhab.core.model.rule.tests/itest.bndrun +++ b/itests/org.openhab.core.model.rule.tests/itest.bndrun @@ -34,11 +34,7 @@ Fragment-Host: org.openhab.core.model.rule.runtime org.eclipse.emf.ecore.xmi;version='[2.16.0,2.16.1)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ com.google.guava;version='[30.1.0,30.1.1)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -119,5 +115,9 @@ Fragment-Host: org.openhab.core.model.rule.runtime org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.core.voice;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.openhab.core.model.thing.runtime;version='[4.1.0,4.1.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)' + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + org.openhab.core.model.item.runtime;version='[4.1.0,4.1.1)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.model.script.tests/itest.bndrun b/itests/org.openhab.core.model.script.tests/itest.bndrun index b278764476d..cf65e2602d7 100644 --- a/itests/org.openhab.core.model.script.tests/itest.bndrun +++ b/itests/org.openhab.core.model.script.tests/itest.bndrun @@ -33,11 +33,7 @@ Fragment-Host: org.openhab.core.model.script org.eclipse.emf.ecore.xmi;version='[2.16.0,2.16.1)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ com.google.guava;version='[30.1.0,30.1.1)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -122,4 +118,8 @@ Fragment-Host: org.openhab.core.model.script org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.core.voice;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.openhab.core.model.thing.runtime;version='[4.1.0,4.1.1)' + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + org.openhab.core.model.item.runtime;version='[4.1.0,4.1.1)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.model.thing.tests/itest.bndrun b/itests/org.openhab.core.model.thing.tests/itest.bndrun index 8de4af86738..9e08f6ee0de 100644 --- a/itests/org.openhab.core.model.thing.tests/itest.bndrun +++ b/itests/org.openhab.core.model.thing.tests/itest.bndrun @@ -31,11 +31,7 @@ Fragment-Host: org.openhab.core.model.thing org.eclipse.emf.ecore.xmi;version='[2.16.0,2.16.1)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ com.google.guava;version='[30.1.0,30.1.1)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -83,7 +79,6 @@ Fragment-Host: org.openhab.core.model.thing org.eclipse.jetty.http2.client;version='[9.4.50,9.4.51)',\ org.eclipse.jetty.http2.common;version='[9.4.50,9.4.51)',\ org.eclipse.jetty.http2.hpack;version='[9.4.50,9.4.51)',\ - org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ xstream;version='[1.4.20,1.4.21)',\ junit-jupiter-api;version='[5.9.2,5.9.3)',\ junit-jupiter-engine;version='[5.9.2,5.9.3)',\ @@ -124,4 +119,9 @@ Fragment-Host: org.openhab.core.model.thing org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.core.voice;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)' + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.storage.json.tests/itest.bndrun b/itests/org.openhab.core.storage.json.tests/itest.bndrun index 4e75aaf5f13..3396796ca50 100644 --- a/itests/org.openhab.core.storage.json.tests/itest.bndrun +++ b/itests/org.openhab.core.storage.json.tests/itest.bndrun @@ -18,12 +18,8 @@ Fragment-Host: org.openhab.core.storage.json jakarta.xml.bind-api;version='[2.3.3,2.3.4)',\ org.apache.servicemix.specs.activation-api-1.2.1;version='[1.2.1,1.2.2)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -61,4 +57,8 @@ Fragment-Host: org.openhab.core.storage.json org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)' + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.tests/itest.bndrun b/itests/org.openhab.core.tests/itest.bndrun index c39489581df..81c5e759b32 100644 --- a/itests/org.openhab.core.tests/itest.bndrun +++ b/itests/org.openhab.core.tests/itest.bndrun @@ -18,12 +18,8 @@ Fragment-Host: org.openhab.core jakarta.xml.bind-api;version='[2.3.3,2.3.4)',\ org.apache.servicemix.specs.activation-api-1.2.1;version='[1.2.1,1.2.2)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -60,4 +56,8 @@ Fragment-Host: org.openhab.core org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.core.tests;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)' + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.thing.tests/itest.bndrun b/itests/org.openhab.core.thing.tests/itest.bndrun index 407c7de4c2a..c975de3219b 100644 --- a/itests/org.openhab.core.thing.tests/itest.bndrun +++ b/itests/org.openhab.core.thing.tests/itest.bndrun @@ -22,12 +22,8 @@ Fragment-Host: org.openhab.core.thing jakarta.xml.bind-api;version='[2.3.3,2.3.4)',\ org.apache.servicemix.specs.activation-api-1.2.1;version='[1.2.1,1.2.2)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -68,4 +64,8 @@ Fragment-Host: org.openhab.core.thing org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.thing.tests;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ - org.openhab.base-fixes;version='[1.0.0,1.0.1)' + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.voice.tests/itest.bndrun b/itests/org.openhab.core.voice.tests/itest.bndrun index e50ed771a88..a8fba8b37c2 100644 --- a/itests/org.openhab.core.voice.tests/itest.bndrun +++ b/itests/org.openhab.core.voice.tests/itest.bndrun @@ -22,12 +22,8 @@ Fragment-Host: org.openhab.core.voice jakarta.xml.bind-api;version='[2.3.3,2.3.4)',\ org.apache.servicemix.specs.activation-api-1.2.1;version='[1.2.1,1.2.2)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ - jakarta.annotation-api;version='[2.0.0,2.0.1)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ - javax.measure.unit-api;version='[2.1.2,2.1.3)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ - tech.units.indriya;version='[2.1.2,2.1.3)',\ - uom-lib-common;version='[2.1.0,2.1.1)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ @@ -73,4 +69,8 @@ Fragment-Host: org.openhab.core.voice org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.core.voice;version='[4.1.0,4.1.1)',\ org.openhab.core.voice.tests;version='[4.1.0,4.1.1)',\ - org.openhab.base-fixes;version='[1.0.0,1.0.1)' + org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ + javax.measure.unit-api;version='[2.2.0,2.2.1)',\ + org.apiguardian.api;version='[1.1.2,1.1.3)',\ + tech.units.indriya;version='[2.2.0,2.2.1)',\ + uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/tools/upgradetool/pom.xml b/tools/upgradetool/pom.xml index 44a0ac71688..890c02c14b2 100644 --- a/tools/upgradetool/pom.xml +++ b/tools/upgradetool/pom.xml @@ -51,7 +51,7 @@ javax.measure unit-api - 2.1.3 + 2.2 si.uom @@ -61,7 +61,7 @@ tech.units indriya - 2.1.2 + 2.2 org.eclipse.jdt From a2401059e56d56286949348274d95ef975184650 Mon Sep 17 00:00:00 2001 From: J-N-K Date: Sat, 19 Aug 2023 10:16:22 +0200 Subject: [PATCH 04/22] Improve AutomationIntegrationJsonTest (#3760) Signed-off-by: Jan N. Klug --- .../integration/test/AutomationIntegrationJsonTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/itests/org.openhab.core.automation.integration.tests/src/main/java/org/openhab/core/automation/integration/test/AutomationIntegrationJsonTest.java b/itests/org.openhab.core.automation.integration.tests/src/main/java/org/openhab/core/automation/integration/test/AutomationIntegrationJsonTest.java index c970d204012..9aa3cae7c8b 100644 --- a/itests/org.openhab.core.automation.integration.tests/src/main/java/org/openhab/core/automation/integration/test/AutomationIntegrationJsonTest.java +++ b/itests/org.openhab.core.automation.integration.tests/src/main/java/org/openhab/core/automation/integration/test/AutomationIntegrationJsonTest.java @@ -275,7 +275,8 @@ public void assertThatARuleFromJsonFileIsAddedAutomatically() { } @Test - public void assertThatARuleFromJsonFileIsAddedAutomaticallyAndTheRuntimeRuleHasResolvedModuleReferences() { + public void assertThatARuleFromJsonFileIsAddedAutomaticallyAndTheRuntimeRuleHasResolvedModuleReferences() + throws InterruptedException { logger.info( "assert that a rule from json file is added automatically and the runtime rule has resolved module references"); @@ -333,6 +334,7 @@ public void receive(Event e) { }; registerService(itemEventHandler); + Thread.sleep(1000); eventPublisher.post(ItemEventFactory.createStateEvent("myMotionItem", OnOffType.ON)); waitForAssert(() -> { assertThat(itemEvent, is(notNullValue())); @@ -342,7 +344,7 @@ public void receive(Event e) { } @Test - public void assertThatARuleFromJsonFileIsExecutedCorrectly() throws ItemNotFoundException { + public void assertThatARuleFromJsonFileIsExecutedCorrectly() throws ItemNotFoundException, InterruptedException { logger.info("assert that rule added by json is executed correctly"); waitForAssert(() -> { assertThat(ruleRegistry.getAll().isEmpty(), is(false)); @@ -378,6 +380,7 @@ public void receive(Event e) { }; registerService(eventHandler); + Thread.sleep(1000); eventPublisher.post(ItemEventFactory.createStateEvent("myMotionItem", OnOffType.ON)); waitForAssert(() -> { assertThat(itemEvent, is(notNullValue())); From d909543415f7396c0618fea9c4431152cb8d5cd4 Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Sat, 19 Aug 2023 10:54:57 +0200 Subject: [PATCH 05/22] Upgrade org.bouncycastle:bcpkix-jdk15on (#3765) --- bundles/org.openhab.core.io.jetty.certificate/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.core.io.jetty.certificate/pom.xml b/bundles/org.openhab.core.io.jetty.certificate/pom.xml index 40fdf0dbac2..2034757bd44 100644 --- a/bundles/org.openhab.core.io.jetty.certificate/pom.xml +++ b/bundles/org.openhab.core.io.jetty.certificate/pom.xml @@ -16,8 +16,8 @@ org.bouncycastle - bcpkix-jdk15on - 1.52 + bcpkix-jdk18on + 1.76 From c0b4ccfd7c05257d7b1a007ef3f9a406ee26cf33 Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Mon, 21 Aug 2023 10:22:27 +0200 Subject: [PATCH 06/22] Update Jackson to 2.15.2 (#3768) Updates Jackson from 2.14.1 to 2.15.2 For release notes, see: https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.15 This upgrade addresses: * CVE-2022-1471 Signed-off-by: Wouter Born --- bom/runtime/pom.xml | 2 +- .../openhab-tp/src/main/feature/feature.xml | 24 +++++++++---------- .../itest.bndrun | 5 ++-- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/bom/runtime/pom.xml b/bom/runtime/pom.xml index c57e8c15cc6..7499fb8133c 100644 --- a/bom/runtime/pom.xml +++ b/bom/runtime/pom.xml @@ -18,7 +18,7 @@ 2.7.4 3.4.5 - 2.14.1 + 2.15.2 9.4.50.v20221201 2.2.0 8.0.15 diff --git a/features/karaf/openhab-tp/src/main/feature/feature.xml b/features/karaf/openhab-tp/src/main/feature/feature.xml index a5b9ad7a9d5..9f4034732ba 100644 --- a/features/karaf/openhab-tp/src/main/feature/feature.xml +++ b/features/karaf/openhab-tp/src/main/feature/feature.xml @@ -89,18 +89,18 @@ - openhab.tp;feature=jackson;version=2.14.1 - mvn:com.fasterxml.jackson.core/jackson-annotations/2.14.1 - mvn:com.fasterxml.jackson.core/jackson-core/2.14.1 - mvn:com.fasterxml.jackson.core/jackson-databind/2.14.1 - mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-cbor/2.14.1 - mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-xml/2.14.1 - mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.14.1 - mvn:com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.14.1 - mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/2.14.1 - mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/2.14.1 - mvn:com.fasterxml.jackson.module/jackson-module-jaxb-annotations/2.14.1 - mvn:org.yaml/snakeyaml/1.33 + openhab.tp;feature=jackson;version=2.15.2 + mvn:com.fasterxml.jackson.core/jackson-annotations/2.15.2 + mvn:com.fasterxml.jackson.core/jackson-core/2.15.2 + mvn:com.fasterxml.jackson.core/jackson-databind/2.15.2 + mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-cbor/2.15.2 + mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-xml/2.15.2 + mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.15.2 + mvn:com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.15.2 + mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/2.15.2 + mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/2.15.2 + mvn:com.fasterxml.jackson.module/jackson-module-jaxb-annotations/2.15.2 + mvn:org.yaml/snakeyaml/2.1 diff --git a/itests/org.openhab.core.io.rest.core.tests/itest.bndrun b/itests/org.openhab.core.io.rest.core.tests/itest.bndrun index 6e9677460ac..71d775c3a18 100644 --- a/itests/org.openhab.core.io.rest.core.tests/itest.bndrun +++ b/itests/org.openhab.core.io.rest.core.tests/itest.bndrun @@ -53,7 +53,6 @@ Fragment-Host: org.openhab.core.io.rest.core org.objectweb.asm;version='[9.4.0,9.4.1)',\ io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ - com.fasterxml.woodstox.woodstox-core;version='[6.4.0,6.4.1)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ org.apache.felix.scr;version='[2.2.4,2.2.5)',\ @@ -104,8 +103,8 @@ Fragment-Host: org.openhab.core.io.rest.core org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)',\ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + com.fasterxml.woodstox.woodstox-core;version='[6.5.1,6.5.2)' From 7743e9f9abbdeb21e1be74ab75a4d7249949dfb0 Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Mon, 21 Aug 2023 21:23:09 +0200 Subject: [PATCH 07/22] Update CXF to 3.6.1 (#3770) Updates CXF from 3.4.5 to 3.6.1 For some recent release notes, see: * [3.5.0](https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310511&version=12348382) * [3.6.0](https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310511&version=12351469) * [3.6.1](https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310511&version=12353191) This upgrade addresses: * CVE-2022-46363 * CVE-2022-46364 Signed-off-by: Wouter Born --- bom/runtime/pom.xml | 2 +- bom/test/pom.xml | 2 +- .../openhab-tp/src/main/feature/feature.xml | 20 +++++++++---------- .../itest.bndrun | 1 - .../itest.bndrun | 1 - .../itest.bndrun | 1 - .../itest.bndrun | 1 - .../itest.bndrun | 1 - .../itest.bndrun | 1 - .../itest.bndrun | 1 - .../itest.bndrun | 1 - .../itest.bndrun | 1 - .../itest.bndrun | 1 - .../itest.bndrun | 1 - .../itest.bndrun | 1 - .../itest.bndrun | 1 - .../itest.bndrun | 1 - .../itest.bndrun | 18 ++++++++--------- .../itest.bndrun | 5 ++--- .../itest.bndrun | 2 -- .../itest.bndrun | 1 - .../itest.bndrun | 5 ++--- .../itest.bndrun | 1 - itests/org.openhab.core.tests/itest.bndrun | 1 - 24 files changed, 24 insertions(+), 47 deletions(-) diff --git a/bom/runtime/pom.xml b/bom/runtime/pom.xml index 7499fb8133c..dcc8ff13644 100644 --- a/bom/runtime/pom.xml +++ b/bom/runtime/pom.xml @@ -17,7 +17,7 @@ 2.7.4 - 3.4.5 + 3.6.1 2.15.2 9.4.50.v20221201 2.2.0 diff --git a/bom/test/pom.xml b/bom/test/pom.xml index 48b6f5be1db..d35524be7ff 100644 --- a/bom/test/pom.xml +++ b/bom/test/pom.xml @@ -16,7 +16,7 @@ openHAB Core :: BOM :: Test - 3.4.5 + 3.6.1 5.9.2 4.11.0 diff --git a/features/karaf/openhab-tp/src/main/feature/feature.xml b/features/karaf/openhab-tp/src/main/feature/feature.xml index 9f4034732ba..ab2b8ac495d 100644 --- a/features/karaf/openhab-tp/src/main/feature/feature.xml +++ b/features/karaf/openhab-tp/src/main/feature/feature.xml @@ -133,21 +133,21 @@ - openhab.tp;feature=cxf;version=3.4.5 + openhab.tp;feature=cxf;version=3.6.1 openhab.tp-jaxws - mvn:com.fasterxml.woodstox/woodstox-core/6.2.6 + mvn:com.fasterxml.woodstox/woodstox-core/6.5.1 mvn:jakarta.jws/jakarta.jws-api/2.1.0 mvn:jakarta.xml.ws/jakarta.xml.ws-api/2.3.3 mvn:javax.servlet/javax.servlet-api/3.1.0 - mvn:org.apache.aries.spec/org.apache.aries.javax.jax.rs-api/1.0.1 - mvn:org.apache.ws.xmlschema/xmlschema-core/2.2.5 + mvn:org.apache.aries.spec/org.apache.aries.javax.jax.rs-api/1.0.4 + mvn:org.apache.ws.xmlschema/xmlschema-core/2.3.0 mvn:org.codehaus.woodstox/stax2-api/4.2.1 - mvn:org.apache.cxf/cxf-core/3.4.5 - mvn:org.apache.cxf/cxf-rt-frontend-jaxrs/3.4.5 - mvn:org.apache.cxf/cxf-rt-rs-client/3.4.5 - mvn:org.apache.cxf/cxf-rt-rs-sse/3.4.5 - mvn:org.apache.cxf/cxf-rt-security/3.4.5 - mvn:org.apache.cxf/cxf-rt-transports-http/3.4.5 + mvn:org.apache.cxf/cxf-core/3.6.1 + mvn:org.apache.cxf/cxf-rt-frontend-jaxrs/3.6.1 + mvn:org.apache.cxf/cxf-rt-rs-client/3.6.1 + mvn:org.apache.cxf/cxf-rt-rs-sse/3.6.1 + mvn:org.apache.cxf/cxf-rt-security/3.6.1 + mvn:org.apache.cxf/cxf-rt-transports-http/3.6.1 diff --git a/itests/org.openhab.core.auth.oauth2client.tests/itest.bndrun b/itests/org.openhab.core.auth.oauth2client.tests/itest.bndrun index 035e305e7a9..9c53b6c796c 100644 --- a/itests/org.openhab.core.auth.oauth2client.tests/itest.bndrun +++ b/itests/org.openhab.core.auth.oauth2client.tests/itest.bndrun @@ -66,7 +66,6 @@ Fragment-Host: org.openhab.core.auth.oauth2client org.openhab.core.io.net;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)',\ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ diff --git a/itests/org.openhab.core.automation.integration.tests/itest.bndrun b/itests/org.openhab.core.automation.integration.tests/itest.bndrun index ca830f97013..14a5d1cbcdb 100644 --- a/itests/org.openhab.core.automation.integration.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.integration.tests/itest.bndrun @@ -64,7 +64,6 @@ Fragment-Host: org.openhab.core.automation org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)',\ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ diff --git a/itests/org.openhab.core.automation.module.core.tests/itest.bndrun b/itests/org.openhab.core.automation.module.core.tests/itest.bndrun index d7e12f4fc05..34aed5a04d1 100644 --- a/itests/org.openhab.core.automation.module.core.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.module.core.tests/itest.bndrun @@ -64,7 +64,6 @@ Fragment-Host: org.openhab.core.automation org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)',\ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ diff --git a/itests/org.openhab.core.automation.module.script.tests/itest.bndrun b/itests/org.openhab.core.automation.module.script.tests/itest.bndrun index cd8fd51a20b..b099138fb2b 100644 --- a/itests/org.openhab.core.automation.module.script.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.module.script.tests/itest.bndrun @@ -61,7 +61,6 @@ Fragment-Host: org.openhab.core.automation.module.script org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)',\ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ diff --git a/itests/org.openhab.core.automation.module.timer.tests/itest.bndrun b/itests/org.openhab.core.automation.module.timer.tests/itest.bndrun index 1419752a776..c751cac6aa0 100644 --- a/itests/org.openhab.core.automation.module.timer.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.module.timer.tests/itest.bndrun @@ -64,7 +64,6 @@ Fragment-Host: org.openhab.core.automation org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)',\ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ diff --git a/itests/org.openhab.core.automation.tests/itest.bndrun b/itests/org.openhab.core.automation.tests/itest.bndrun index 3123d519255..ce27e95c46b 100644 --- a/itests/org.openhab.core.automation.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.tests/itest.bndrun @@ -64,7 +64,6 @@ Fragment-Host: org.openhab.core.automation org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)',\ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ diff --git a/itests/org.openhab.core.config.core.tests/itest.bndrun b/itests/org.openhab.core.config.core.tests/itest.bndrun index 90022058c33..886bd951726 100644 --- a/itests/org.openhab.core.config.core.tests/itest.bndrun +++ b/itests/org.openhab.core.config.core.tests/itest.bndrun @@ -59,7 +59,6 @@ Fragment-Host: org.openhab.core.config.core org.openhab.core.config.core.tests;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)',\ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ diff --git a/itests/org.openhab.core.config.discovery.mdns.tests/itest.bndrun b/itests/org.openhab.core.config.discovery.mdns.tests/itest.bndrun index e4aeba2bbbd..6054da8b8b7 100644 --- a/itests/org.openhab.core.config.discovery.mdns.tests/itest.bndrun +++ b/itests/org.openhab.core.config.discovery.mdns.tests/itest.bndrun @@ -64,7 +64,6 @@ Fragment-Host: org.openhab.core.config.discovery.mdns org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)',\ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ diff --git a/itests/org.openhab.core.config.discovery.tests/itest.bndrun b/itests/org.openhab.core.config.discovery.tests/itest.bndrun index de5f18bdaf3..6dfa200e9dd 100644 --- a/itests/org.openhab.core.config.discovery.tests/itest.bndrun +++ b/itests/org.openhab.core.config.discovery.tests/itest.bndrun @@ -63,7 +63,6 @@ Fragment-Host: org.openhab.core.config.discovery org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)',\ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ diff --git a/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/itest.bndrun b/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/itest.bndrun index 13952018bf5..280e765e7f6 100644 --- a/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/itest.bndrun +++ b/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/itest.bndrun @@ -64,7 +64,6 @@ Fragment-Host: org.openhab.core.config.discovery.usbserial.linuxsysfs org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)',\ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ diff --git a/itests/org.openhab.core.config.discovery.usbserial.tests/itest.bndrun b/itests/org.openhab.core.config.discovery.usbserial.tests/itest.bndrun index 5e745ef04a3..a18c03aef95 100644 --- a/itests/org.openhab.core.config.discovery.usbserial.tests/itest.bndrun +++ b/itests/org.openhab.core.config.discovery.usbserial.tests/itest.bndrun @@ -72,7 +72,6 @@ Provide-Capability: \ org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)',\ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ diff --git a/itests/org.openhab.core.config.dispatch.tests/itest.bndrun b/itests/org.openhab.core.config.dispatch.tests/itest.bndrun index 2dc72fb519b..d3dde388735 100644 --- a/itests/org.openhab.core.config.dispatch.tests/itest.bndrun +++ b/itests/org.openhab.core.config.dispatch.tests/itest.bndrun @@ -52,7 +52,6 @@ Fragment-Host: org.openhab.core.config.dispatch org.openhab.core.config.dispatch.tests;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)',\ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ diff --git a/itests/org.openhab.core.ephemeris.tests/itest.bndrun b/itests/org.openhab.core.ephemeris.tests/itest.bndrun index 0a2c477d20a..97fb5ce8bca 100644 --- a/itests/org.openhab.core.ephemeris.tests/itest.bndrun +++ b/itests/org.openhab.core.ephemeris.tests/itest.bndrun @@ -61,7 +61,6 @@ feature.openhab-config: \ org.openhab.core.ephemeris.tests;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)',\ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ diff --git a/itests/org.openhab.core.io.net.tests/itest.bndrun b/itests/org.openhab.core.io.net.tests/itest.bndrun index 58716867e0e..f3fbeb0333b 100644 --- a/itests/org.openhab.core.io.net.tests/itest.bndrun +++ b/itests/org.openhab.core.io.net.tests/itest.bndrun @@ -70,7 +70,6 @@ Fragment-Host: org.openhab.core.io.net org.openhab.core.io.net.tests;version='[4.1.0,4.1.1)',\ org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)',\ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ diff --git a/itests/org.openhab.core.io.rest.core.tests/itest.bndrun b/itests/org.openhab.core.io.rest.core.tests/itest.bndrun index 71d775c3a18..22670f5acd5 100644 --- a/itests/org.openhab.core.io.rest.core.tests/itest.bndrun +++ b/itests/org.openhab.core.io.rest.core.tests/itest.bndrun @@ -28,19 +28,10 @@ Fragment-Host: org.openhab.core.io.rest.core org.apache.servicemix.specs.activation-api-1.2.1;version='[1.2.1,1.2.2)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ org.apache.aries.javax.jax.rs-api;version='[1.0.1,1.0.2)',\ - jakarta.xml.soap-api;version='[1.4.2,1.4.3)',\ - jakarta.xml.ws-api;version='[2.3.3,2.3.4)',\ org.apache.aries.component-dsl.component-dsl;version='[1.2.2,1.2.3)',\ - org.apache.ws.xmlschema.core;version='[2.2.5,2.2.6)',\ stax2-api;version='[4.2.1,4.2.2)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ - org.apache.cxf.cxf-core;version='[3.4.5,3.4.6)',\ - org.apache.cxf.cxf-rt-frontend-jaxrs;version='[3.4.5,3.4.6)',\ - org.apache.cxf.cxf-rt-rs-client;version='[3.4.5,3.4.6)',\ - org.apache.cxf.cxf-rt-rs-sse;version='[3.4.5,3.4.6)',\ - org.apache.cxf.cxf-rt-security;version='[3.4.5,3.4.6)',\ - org.apache.cxf.cxf-rt-transports-http;version='[3.4.5,3.4.6)',\ si-units;version='[2.1.0,2.1.1)',\ si.uom.si-quantity;version='[2.1.0,2.1.1)',\ org.apache.aries.jax.rs.whiteboard;version='[2.0.0,2.0.1)',\ @@ -107,4 +98,11 @@ Fragment-Host: org.openhab.core.io.rest.core org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ uom-lib-common;version='[2.2.0,2.2.1)',\ - com.fasterxml.woodstox.woodstox-core;version='[6.5.1,6.5.2)' + com.fasterxml.woodstox.woodstox-core;version='[6.5.1,6.5.2)',\ + org.apache.cxf.cxf-core;version='[3.6.1,3.6.2)',\ + org.apache.cxf.cxf-rt-frontend-jaxrs;version='[3.6.1,3.6.2)',\ + org.apache.cxf.cxf-rt-rs-client;version='[3.6.1,3.6.2)',\ + org.apache.cxf.cxf-rt-rs-sse;version='[3.6.1,3.6.2)',\ + org.apache.cxf.cxf-rt-security;version='[3.6.1,3.6.2)',\ + org.apache.cxf.cxf-rt-transports-http;version='[3.6.1,3.6.2)',\ + org.apache.ws.xmlschema.core;version='[2.3.0,2.3.1)' diff --git a/itests/org.openhab.core.model.item.tests/itest.bndrun b/itests/org.openhab.core.model.item.tests/itest.bndrun index 0213525638a..79c840168eb 100644 --- a/itests/org.openhab.core.model.item.tests/itest.bndrun +++ b/itests/org.openhab.core.model.item.tests/itest.bndrun @@ -110,9 +110,8 @@ Fragment-Host: org.openhab.core.model.item org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.core.voice;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)',\ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ - org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)' diff --git a/itests/org.openhab.core.model.rule.tests/itest.bndrun b/itests/org.openhab.core.model.rule.tests/itest.bndrun index e1dba991d28..410c1aea6aa 100644 --- a/itests/org.openhab.core.model.rule.tests/itest.bndrun +++ b/itests/org.openhab.core.model.rule.tests/itest.bndrun @@ -115,9 +115,7 @@ Fragment-Host: org.openhab.core.model.rule.runtime org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.core.voice;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)',\ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ - org.openhab.core.model.item.runtime;version='[4.1.0,4.1.1)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.model.script.tests/itest.bndrun b/itests/org.openhab.core.model.script.tests/itest.bndrun index cf65e2602d7..7724a4344da 100644 --- a/itests/org.openhab.core.model.script.tests/itest.bndrun +++ b/itests/org.openhab.core.model.script.tests/itest.bndrun @@ -120,6 +120,5 @@ Fragment-Host: org.openhab.core.model.script org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ - org.openhab.core.model.item.runtime;version='[4.1.0,4.1.1)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ uom-lib-common;version='[2.2.0,2.2.1)' diff --git a/itests/org.openhab.core.model.thing.tests/itest.bndrun b/itests/org.openhab.core.model.thing.tests/itest.bndrun index 9e08f6ee0de..07eea033337 100644 --- a/itests/org.openhab.core.model.thing.tests/itest.bndrun +++ b/itests/org.openhab.core.model.thing.tests/itest.bndrun @@ -119,9 +119,8 @@ Fragment-Host: org.openhab.core.model.thing org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.core.voice;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)',\ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ - org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)' diff --git a/itests/org.openhab.core.storage.json.tests/itest.bndrun b/itests/org.openhab.core.storage.json.tests/itest.bndrun index 3396796ca50..cce09022d8f 100644 --- a/itests/org.openhab.core.storage.json.tests/itest.bndrun +++ b/itests/org.openhab.core.storage.json.tests/itest.bndrun @@ -57,7 +57,6 @@ Fragment-Host: org.openhab.core.storage.json org.openhab.core.thing;version='[4.1.0,4.1.1)',\ org.openhab.core.transform;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)',\ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ diff --git a/itests/org.openhab.core.tests/itest.bndrun b/itests/org.openhab.core.tests/itest.bndrun index 81c5e759b32..56e0a405184 100644 --- a/itests/org.openhab.core.tests/itest.bndrun +++ b/itests/org.openhab.core.tests/itest.bndrun @@ -56,7 +56,6 @@ Fragment-Host: org.openhab.core org.openhab.core.test;version='[4.1.0,4.1.1)',\ org.openhab.core.tests;version='[4.1.0,4.1.1)',\ org.openhab.base-fixes;version='[1.0.0,1.0.1)',\ - org.osgi.service.cm;version='[1.6.0,1.6.1)',\ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ From ce5cef959bde11c981d77afbf3b8ad3e73f9aa54 Mon Sep 17 00:00:00 2001 From: Holger Friedrich Date: Sat, 26 Aug 2023 15:08:03 +0200 Subject: [PATCH 08/22] Migrate to java.nio.file.createTempFile (#3767) Use function from nio package as it uses more restrictive file permissions. Signed-off-by: Holger Friedrich --- .../java/org/openhab/core/audio/internal/AudioServlet.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bundles/org.openhab.core.audio/src/main/java/org/openhab/core/audio/internal/AudioServlet.java b/bundles/org.openhab.core.audio/src/main/java/org/openhab/core/audio/internal/AudioServlet.java index fe5d448a9c0..f36fd82d46c 100644 --- a/bundles/org.openhab.core.audio/src/main/java/org/openhab/core/audio/internal/AudioServlet.java +++ b/bundles/org.openhab.core.audio/src/main/java/org/openhab/core/audio/internal/AudioServlet.java @@ -17,6 +17,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.nio.file.Files; import java.util.Collections; import java.util.List; import java.util.Map; @@ -297,7 +298,7 @@ private AudioStream createClonableInputStream(AudioStream stream, String streamI clonableAudioStreamResult = new ByteArrayAudioStream(dataBytes, stream.getFormat()); } else { // in memory max size exceeded, sound is too long, we will use a file - File tempFile = File.createTempFile(streamId, ".snd"); + File tempFile = Files.createTempFile(streamId, ".snd").toFile(); tempFile.deleteOnExit(); try (OutputStream outputStream = new FileOutputStream(tempFile)) { // copy already read data to file : From 9e1dbb6435851a78db5cbbbe8a63cd8d74b2baf8 Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Sat, 26 Aug 2023 15:08:46 +0200 Subject: [PATCH 09/22] Update json-path to 2.8.0 (#3772) Updates json-path from 2.4.0 to 2.8.0 This addresses: * CVE-2021-27568 * CVE-2021-31684 * CVE-2023-1370 Signed-off-by: Wouter Born --- bom/test/pom.xml | 2 +- itests/org.openhab.core.io.rest.core.tests/itest.bndrun | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/bom/test/pom.xml b/bom/test/pom.xml index d35524be7ff..5c8aae9071a 100644 --- a/bom/test/pom.xml +++ b/bom/test/pom.xml @@ -65,7 +65,7 @@ com.jayway.jsonpath json-path - 2.4.0 + 2.8.0 org.apache.aries.jax.rs diff --git a/itests/org.openhab.core.io.rest.core.tests/itest.bndrun b/itests/org.openhab.core.io.rest.core.tests/itest.bndrun index 22670f5acd5..3cc69a22d9d 100644 --- a/itests/org.openhab.core.io.rest.core.tests/itest.bndrun +++ b/itests/org.openhab.core.io.rest.core.tests/itest.bndrun @@ -13,10 +13,6 @@ Fragment-Host: org.openhab.core.io.rest.core # done # -runbundles: \ - com.jayway.jsonpath.json-path;version='[2.4.0,2.4.1)',\ - net.minidev.accessors-smart;version='[1.2.0,1.2.1)',\ - net.minidev.json-smart;version='[2.3.0,2.3.1)',\ - org.objectweb.asm;version='[5.0.4,5.0.5)',\ org.osgi.service.event;version='[1.4.0,1.4.1)',\ org.apache.servicemix.specs.annotation-api-1.3;version='[1.3.0,1.3.1)',\ org.eclipse.equinox.event;version='[1.4.300,1.4.301)',\ @@ -105,4 +101,7 @@ Fragment-Host: org.openhab.core.io.rest.core org.apache.cxf.cxf-rt-rs-sse;version='[3.6.1,3.6.2)',\ org.apache.cxf.cxf-rt-security;version='[3.6.1,3.6.2)',\ org.apache.cxf.cxf-rt-transports-http;version='[3.6.1,3.6.2)',\ - org.apache.ws.xmlschema.core;version='[2.3.0,2.3.1)' + org.apache.ws.xmlschema.core;version='[2.3.0,2.3.1)',\ + json-path;version='[2.8.0,2.8.1)',\ + net.minidev.accessors-smart;version='[2.4.9,2.4.10)',\ + net.minidev.json-smart;version='[2.4.10,2.4.11)' From 096d11bf3f424709865a19ad596f0f33d4b67d8d Mon Sep 17 00:00:00 2001 From: Mark Herwege Date: Sat, 26 Aug 2023 15:10:10 +0200 Subject: [PATCH 10/22] Fix sitemap visibility rule with blanks (#3769) Signed-off-by: Mark Herwege --- .../ui/internal/components/UIComponentSitemapProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 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 6222e8f7cd9..39c0f47dce5 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 @@ -87,9 +87,9 @@ public class UIComponentSitemapProvider implements SitemapProvider, RegistryChan private static final String SITEMAP_SUFFIX = ".sitemap"; private static final Pattern VISIBILITY_PATTERN = Pattern - .compile("(?[A-Za-z]\\w*)\\s*(?==|!=|<=|>=|<|>)\\s*(?\\+|-)?(?\\S+)"); + .compile("(?[A-Za-z]\\w*)\\s*(?==|!=|<=|>=|<|>)\\s*(?\\+|-)?(?.+)"); private static final Pattern COLOR_PATTERN = Pattern.compile( - "((?[A-Za-z]\\w*)?\\s*((?==|!=|<=|>=|<|>)\\s*(?\\+|-)?(?\\S+))?\\s*=)?\\s*(?\\S+)"); + "((?[A-Za-z]\\w*)?\\s*((?==|!=|<=|>=|<|>)\\s*(?\\+|-)?(?[^=]+))?\\s*=)?\\s*(?\\S+)"); private Map sitemaps = new HashMap<>(); private @Nullable UIComponentRegistryFactory componentRegistryFactory; From 8c36d5769242bd44aa30a73702fdc648fcafc0b5 Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Sun, 27 Aug 2023 11:07:58 +0200 Subject: [PATCH 11/22] Fix compilerArguments deprecation warnings (#3780) This fixes the following warnings: ``` [WARNING] Parameter 'compilerArguments' is deprecated: use {@link #compilerArgs} instead. ``` Related to openhab/openhab-core#3512 Signed-off-by: Wouter Born --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index d92eb97a4e2..1c090499277 100644 --- a/pom.xml +++ b/pom.xml @@ -280,11 +280,11 @@ Import-Package: \\ 3.10.1 eclipse - - CLASSPATH - ${project.build.directory}/dependency - + -annotationpath + CLASSPATH + -classpath + ${project.build.directory}/dependency -err:+nullAnnot(org.eclipse.jdt.annotation.Nullable|org.eclipse.jdt.annotation.NonNull|org.eclipse.jdt.annotation.NonNullByDefault),+inheritNullAnnot,+nullAnnotConflict,-nullUncheckedConversion -warn:+null,+inheritNullAnnot,+nullAnnotConflict,-nullUncheckedConversion,+nullAnnotRedundant,+nullDereference From 5daf4ff076809c32b3e84c4ba328f0bc66627b7b Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Sun, 27 Aug 2023 11:15:15 +0200 Subject: [PATCH 12/22] Fix SAT and null analysis issues (#3781) Signed-off-by: Wouter Born --- .../script/profile/ScriptProfileFactory.java | 4 +++- .../rest/internal/RuleResource.java | 1 - .../openhab/core/io/rest/auth/AuthFilter.java | 5 +++- .../core/karaf/internal/FeatureInstaller.java | 20 ---------------- .../CommunicationManagerConversionTest.java | 8 +++---- .../AbstractStorageBasedTypeProviderTest.java | 23 ++++++++----------- .../items/ItemStateConverterImpl.java | 4 ++-- .../core/library/items/NumberItem.java | 21 +++++++---------- .../internal/i18n/I18nProviderImplTest.java | 3 +-- .../core/library/types/QuantityTypeTest.java | 4 ++-- .../internal/module/RunRuleModuleTest.java | 9 ++++---- .../internal/module/RuntimeRuleTest.java | 9 ++++---- .../internal/BasicConditionHandlerTest.java | 7 +++--- .../DayOfWeekConditionHandlerTest.java | 5 ++-- .../timer/internal/RuntimeRuleTest.java | 9 ++++---- .../core/automation/event/RuleEventTest.java | 7 +++--- ...tractStorageBasedTypeProviderOSGiTest.java | 12 ++++------ .../CommunicationManagerOSGiTest.java | 16 ++++++------- 18 files changed, 66 insertions(+), 101 deletions(-) diff --git a/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/profile/ScriptProfileFactory.java b/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/profile/ScriptProfileFactory.java index 6e46afa5f3a..48961c93cc8 100644 --- a/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/profile/ScriptProfileFactory.java +++ b/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/profile/ScriptProfileFactory.java @@ -74,7 +74,9 @@ public Collection getProfileTypes(@Nullable Locale locale) { public void bindScriptTransformationService(ScriptTransformationService service, Map properties) { String serviceId = (String) properties.get(TransformationService.SERVICE_PROPERTY_NAME); String serviceLabel = (String) properties.get(TransformationService.SERVICE_PROPERTY_LABEL); - services.put(serviceId, new ServiceRecord(service, serviceLabel)); + if (serviceId != null && serviceLabel != null) { + services.put(serviceId, new ServiceRecord(service, serviceLabel)); + } } public void unbindScriptTransformationService(ScriptTransformationService service, Map properties) { diff --git a/bundles/org.openhab.core.automation.rest/src/main/java/org/openhab/core/automation/rest/internal/RuleResource.java b/bundles/org.openhab.core.automation.rest/src/main/java/org/openhab/core/automation/rest/internal/RuleResource.java index 5d8dcebb401..cb78591b104 100644 --- a/bundles/org.openhab.core.automation.rest/src/main/java/org/openhab/core/automation/rest/internal/RuleResource.java +++ b/bundles/org.openhab.core.automation.rest/src/main/java/org/openhab/core/automation/rest/internal/RuleResource.java @@ -169,7 +169,6 @@ public Response get(@Context SecurityContext securityContext, @Context Request r @QueryParam("prefix") final @Nullable String prefix, @QueryParam("tags") final @Nullable List tags, @QueryParam("summary") @Parameter(description = "summary fields only") @Nullable Boolean summary, @DefaultValue("false") @QueryParam("staticDataOnly") @Parameter(description = "provides a cacheable list of values not expected to change regularly and honors the If-Modified-Since header, all other parameters are ignored") boolean staticDataOnly) { - if ((summary == null || !summary) && !securityContext.isUserInRole(Role.ADMIN)) { // users may only access the summary return JSONResponse.createErrorResponse(Status.UNAUTHORIZED, "Authentication required"); diff --git a/bundles/org.openhab.core.io.rest.auth/src/main/java/org/openhab/core/io/rest/auth/AuthFilter.java b/bundles/org.openhab.core.io.rest.auth/src/main/java/org/openhab/core/io/rest/auth/AuthFilter.java index 738e15fe575..31fe5574f7a 100644 --- a/bundles/org.openhab.core.io.rest.auth/src/main/java/org/openhab/core/io/rest/auth/AuthFilter.java +++ b/bundles/org.openhab.core.io.rest.auth/src/main/java/org/openhab/core/io/rest/auth/AuthFilter.java @@ -53,7 +53,10 @@ import org.openhab.core.config.core.ConfigurableService; import org.openhab.core.io.rest.JSONResponse; import org.openhab.core.io.rest.RESTConstants; -import org.openhab.core.io.rest.auth.internal.*; +import org.openhab.core.io.rest.auth.internal.ExpiringUserSecurityContextCache; +import org.openhab.core.io.rest.auth.internal.JwtHelper; +import org.openhab.core.io.rest.auth.internal.JwtSecurityContext; +import org.openhab.core.io.rest.auth.internal.UserSecurityContext; import org.osgi.framework.Constants; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; diff --git a/bundles/org.openhab.core.karaf/src/main/java/org/openhab/core/karaf/internal/FeatureInstaller.java b/bundles/org.openhab.core.karaf/src/main/java/org/openhab/core/karaf/internal/FeatureInstaller.java index 4613a77c98d..5f49fa5f748 100644 --- a/bundles/org.openhab.core.karaf/src/main/java/org/openhab/core/karaf/internal/FeatureInstaller.java +++ b/bundles/org.openhab.core.karaf/src/main/java/org/openhab/core/karaf/internal/FeatureInstaller.java @@ -470,26 +470,6 @@ private void installFeatures(Set addons) { } } - private boolean installFeature(String name) { - try { - Feature[] features = featuresService.listInstalledFeatures(); - if (!anyMatchingFeature(features, withName(name))) { - featuresService.installFeature(name, - EnumSet.of(FeaturesService.Option.Upgrade, FeaturesService.Option.NoAutoRefreshBundles)); - features = featuresService.listInstalledFeatures(); - if (anyMatchingFeature(features, withName(name))) { - logger.debug("Installed '{}'", name); - postInstalledEvent(name); - return true; - } - } - } catch (Exception e) { - logger.error("Failed installing '{}': {}", name, e.getMessage(), debugException(e)); - configMapCache = null; // make sure we retry the installation - } - return false; - } - private void uninstallFeature(String name) { try { Feature[] features = featuresService.listInstalledFeatures(); diff --git a/bundles/org.openhab.core.thing/src/test/java/org/openhab/core/thing/CommunicationManagerConversionTest.java b/bundles/org.openhab.core.thing/src/test/java/org/openhab/core/thing/CommunicationManagerConversionTest.java index f191b1b19da..432a4398321 100644 --- a/bundles/org.openhab.core.thing/src/test/java/org/openhab/core/thing/CommunicationManagerConversionTest.java +++ b/bundles/org.openhab.core.thing/src/test/java/org/openhab/core/thing/CommunicationManagerConversionTest.java @@ -62,11 +62,11 @@ public class CommunicationManagerConversionTest { // TODO: remove test - only to show CommunicationManager is too complex - private static final List> itemTypes = List.of(CallItem.class, ColorItem.class, + private static final List> ITEM_TYPES = List.of(CallItem.class, ColorItem.class, ContactItem.class, DateTimeItem.class, DimmerItem.class, ImageItem.class, LocationItem.class, PlayerItem.class, RollershutterItem.class, StringItem.class); - private static final List> types = List.of(DateTimeType.class, DecimalType.class, + private static final List> TYPES = List.of(DateTimeType.class, DecimalType.class, HSBType.class, IncreaseDecreaseType.class, NextPreviousType.class, OnOffType.class, OpenClosedType.class, PercentType.class, PlayPauseType.class, PointType.class, QuantityType.class, RawType.class, RewindFastforwardType.class, StringType.class, UpDownType.class, UnDefType.class); @@ -74,9 +74,9 @@ public class CommunicationManagerConversionTest { private static Stream arguments() throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException { List arguments = new ArrayList<>(); - for (Class itemType : itemTypes) { + for (Class itemType : ITEM_TYPES) { Item item = itemType.getDeclaredConstructor(String.class).newInstance("testItem"); - for (Class type : types) { + for (Class type : TYPES) { if (type.isEnum()) { arguments.add(Arguments.of(item, type.getEnumConstants()[0])); } else if (type == RawType.class) { diff --git a/bundles/org.openhab.core.thing/src/test/java/org/openhab/core/thing/binding/AbstractStorageBasedTypeProviderTest.java b/bundles/org.openhab.core.thing/src/test/java/org/openhab/core/thing/binding/AbstractStorageBasedTypeProviderTest.java index 22ac0a2e56a..3b06e275382 100644 --- a/bundles/org.openhab.core.thing/src/test/java/org/openhab/core/thing/binding/AbstractStorageBasedTypeProviderTest.java +++ b/bundles/org.openhab.core.thing/src/test/java/org/openhab/core/thing/binding/AbstractStorageBasedTypeProviderTest.java @@ -13,15 +13,12 @@ package org.openhab.core.thing.binding; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.containsInAnyOrder; -import static org.hamcrest.Matchers.hasEntry; -import static org.hamcrest.Matchers.hasItems; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.notNullValue; +import static org.hamcrest.Matchers.*; import java.net.URI; import java.util.List; import java.util.Map; +import java.util.Objects; import org.eclipse.jdt.annotation.NonNullByDefault; import org.junit.jupiter.api.Test; @@ -101,9 +98,8 @@ public void testChannelGroupTypeProperlyMappedToEntityAndBack() { List actualChannelDefinitions = actual.getChannelDefinitions(); assertThat(actualChannelDefinitions.size(), is(expectedChannelDefinitions.size())); for (ChannelDefinition expectedChannelDefinition : expectedChannelDefinitions) { - ChannelDefinition actualChannelDefinition = actualChannelDefinitions.stream() - .filter(d -> d.getId().equals(expectedChannelDefinition.getId())).findFirst().orElse(null); - assertThat(actualChannelDefinition, is(notNullValue())); + ChannelDefinition actualChannelDefinition = Objects.requireNonNull(actualChannelDefinitions.stream() + .filter(d -> d.getId().equals(expectedChannelDefinition.getId())).findFirst().orElse(null)); assertChannelDefinition(actualChannelDefinition, expectedChannelDefinition); } } @@ -145,18 +141,17 @@ public void testThingTypeProperlyMappedToEntityAndBack() { List actualChannelDefinitions = actual.getChannelDefinitions(); assertThat(actualChannelDefinitions.size(), is(expectedChannelDefinitions.size())); for (ChannelDefinition expectedChannelDefinition : expectedChannelDefinitions) { - ChannelDefinition actualChannelDefinition = actualChannelDefinitions.stream() - .filter(d -> d.getId().equals(expectedChannelDefinition.getId())).findFirst().orElse(null); - assertThat(actualChannelDefinition, is(notNullValue())); + ChannelDefinition actualChannelDefinition = Objects.requireNonNull(actualChannelDefinitions.stream() + .filter(d -> d.getId().equals(expectedChannelDefinition.getId())).findFirst().orElse(null)); assertChannelDefinition(actualChannelDefinition, expectedChannelDefinition); } List expectedChannelGroupDefinitions = expected.getChannelGroupDefinitions(); List actualChannelGroupDefinitions = actual.getChannelGroupDefinitions(); assertThat(actualChannelGroupDefinitions.size(), is(expectedChannelGroupDefinitions.size())); for (ChannelGroupDefinition expectedChannelGroupDefinition : expectedChannelGroupDefinitions) { - ChannelGroupDefinition actualChannelGroupDefinition = actualChannelGroupDefinitions.stream() - .filter(d -> d.getId().equals(expectedChannelGroupDefinition.getId())).findFirst().orElse(null); - assertThat(actualChannelGroupDefinition, is(notNullValue())); + ChannelGroupDefinition actualChannelGroupDefinition = Objects.requireNonNull(actualChannelGroupDefinitions + .stream().filter(d -> d.getId().equals(expectedChannelGroupDefinition.getId())).findFirst() + .orElse(null)); assertChannelGroupDefinition(actualChannelGroupDefinition, expectedChannelGroupDefinition); } } diff --git a/bundles/org.openhab.core/src/main/java/org/openhab/core/internal/items/ItemStateConverterImpl.java b/bundles/org.openhab.core/src/main/java/org/openhab/core/internal/items/ItemStateConverterImpl.java index 4a47fdf3eb1..275530a9749 100644 --- a/bundles/org.openhab.core/src/main/java/org/openhab/core/internal/items/ItemStateConverterImpl.java +++ b/bundles/org.openhab.core/src/main/java/org/openhab/core/internal/items/ItemStateConverterImpl.java @@ -85,8 +85,8 @@ public State convertToAcceptedState(@Nullable State state, @Nullable Item item) Class> dimension = numberItem.getDimension(); @SuppressWarnings({ "unchecked", "rawtypes" }) // explicit cast to Class as JDK compiler complains - Unit> conversionUnit = unitProvider - .getUnit((Class) dimension); + Unit> conversionUnit = dimension == null ? null + : unitProvider.getUnit((Class) dimension); if (conversionUnit != null && UnitUtils.isDifferentMeasurementSystem(conversionUnit, quantityState.getUnit())) { return convertOrUndef(quantityState, conversionUnit); diff --git a/bundles/org.openhab.core/src/main/java/org/openhab/core/library/items/NumberItem.java b/bundles/org.openhab.core/src/main/java/org/openhab/core/library/items/NumberItem.java index 43727408989..e7218508092 100644 --- a/bundles/org.openhab.core/src/main/java/org/openhab/core/library/items/NumberItem.java +++ b/bundles/org.openhab.core/src/main/java/org/openhab/core/library/items/NumberItem.java @@ -73,7 +73,8 @@ public NumberItem(String type, String name, @Nullable UnitProvider unitProvider) String itemTypeExtension = ItemUtil.getItemTypeExtension(getType()); if (itemTypeExtension != null) { - dimension = UnitUtils.parseDimension(itemTypeExtension); + Class> dimension = UnitUtils.parseDimension(itemTypeExtension); + this.dimension = dimension; if (dimension == null) { throw new IllegalArgumentException("The given dimension " + itemTypeExtension + " is unknown."); } else if (unitProvider == null) { @@ -104,13 +105,11 @@ public void send(QuantityType command) { if (dimension == null) { DecimalType strippedCommand = new DecimalType(command.toBigDecimal()); internalSend(strippedCommand); + } else if (command.getUnit().isCompatible(unit) || command.getUnit().inverse().isCompatible(unit)) { + internalSend(command); } else { - if (command.getUnit().isCompatible(unit) || command.getUnit().inverse().isCompatible(unit)) { - internalSend(command); - } else { - logger.warn("Command '{}' to item '{}' was rejected because it is incompatible with the item unit '{}'", - command, name, unit); - } + logger.warn("Command '{}' to item '{}' was rejected because it is incompatible with the item unit '{}'", + command, name, unit); } } @@ -199,12 +198,7 @@ public void setState(State state) { public void addedMetadata(Metadata metadata) { if (dimension != null && UNIT_METADATA_NAMESPACE.equals(metadata.getUID().getNamespace())) { Unit unit = UnitUtils.parseUnit(metadata.getValue()); - if (unit == null) { - logger.warn("Unit '{}' could not be parsed to a known unit. Keeping old unit '{}' for item '{}'.", - metadata.getValue(), this.unit, name); - return; - } - if (!unit.isCompatible(this.unit) && !unit.inverse().isCompatible(this.unit)) { + if ((unit == null) || (!unit.isCompatible(this.unit) && !unit.inverse().isCompatible(this.unit))) { logger.warn("Unit '{}' could not be parsed to a known unit. Keeping old unit '{}' for item '{}'.", metadata.getValue(), this.unit, name); return; @@ -222,6 +216,7 @@ public void updatedMetadata(Metadata oldMetadata, Metadata newMetadata) { @Override @SuppressWarnings({ "unchecked", "rawtypes" }) public void removedMetadata(Metadata metadata) { + Class> dimension = this.dimension; if (dimension != null && UNIT_METADATA_NAMESPACE.equals(metadata.getUID().getNamespace())) { assert unitProvider != null; unit = unitProvider.getUnit((Class) dimension); diff --git a/bundles/org.openhab.core/src/test/java/org/openhab/core/internal/i18n/I18nProviderImplTest.java b/bundles/org.openhab.core/src/test/java/org/openhab/core/internal/i18n/I18nProviderImplTest.java index bbbca4f4e3d..8efc084e296 100644 --- a/bundles/org.openhab.core/src/test/java/org/openhab/core/internal/i18n/I18nProviderImplTest.java +++ b/bundles/org.openhab.core/src/test/java/org/openhab/core/internal/i18n/I18nProviderImplTest.java @@ -176,8 +176,7 @@ public void assertThatConfigurationChangeWorks() { @MethodSource("getAllDimensions") @SuppressWarnings("unchecked") public > void assertThatUnitProviderIsComplete(String dimensionName) { - Class> dimension = UnitUtils.parseDimension(dimensionName); - assertThat(dimension, is(notNullValue())); + Class> dimension = Objects.requireNonNull(UnitUtils.parseDimension(dimensionName)); Unit defaultUnit = i18nProviderImpl.getUnit((Class) dimension); assertThat(dimensionName + " has no default unit", defaultUnit, notNullValue()); diff --git a/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/QuantityTypeTest.java b/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/QuantityTypeTest.java index 5127233588b..d8c7f84d4a7 100644 --- a/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/QuantityTypeTest.java +++ b/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/QuantityTypeTest.java @@ -463,11 +463,11 @@ public void testDataAmount() { assertEquals(8, bits.byteValue()); bytes = new QuantityType<>("1 MB"); assertEquals("1 MB", bytes.toString()); - bytes = new QuantityType(1, MetricPrefix.MEGA(Units.BYTE)); + bytes = new QuantityType<>(1, MetricPrefix.MEGA(Units.BYTE)); assertEquals("1 MB", bytes.toString()); bytes = new QuantityType<>("1 GiB"); assertEquals("1 GiB", bytes.toString()); - bytes = new QuantityType(1, BinaryPrefix.GIBI(Units.BYTE)); + bytes = new QuantityType<>(1, BinaryPrefix.GIBI(Units.BYTE)); assertEquals("1 GiB", bytes.toString()); QuantityType bigAmount = new QuantityType<>("1 kio"); QuantityType octets = bigAmount.toUnit(Units.OCTET); diff --git a/itests/org.openhab.core.automation.module.core.tests/src/main/java/org/openhab/core/automation/internal/module/RunRuleModuleTest.java b/itests/org.openhab.core.automation.module.core.tests/src/main/java/org/openhab/core/automation/internal/module/RunRuleModuleTest.java index c8242fa373f..75f943c0669 100644 --- a/itests/org.openhab.core.automation.module.core.tests/src/main/java/org/openhab/core/automation/internal/module/RunRuleModuleTest.java +++ b/itests/org.openhab.core.automation.module.core.tests/src/main/java/org/openhab/core/automation/internal/module/RunRuleModuleTest.java @@ -14,8 +14,7 @@ import static java.util.Map.entry; import static org.junit.jupiter.api.Assertions.*; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; +import static org.mockito.Mockito.*; import java.util.ArrayList; import java.util.Collection; @@ -77,8 +76,8 @@ public void before() { startLevelService = mock(StartLevelService.class); when(startLevelService.getStartLevel()).thenReturn(100); registerService(startLevelService, StartLevelService.class.getName()); - EventPublisher eventPublisher = getService(EventPublisher.class); - ItemRegistry itemRegistry = getService(ItemRegistry.class); + EventPublisher eventPublisher = Objects.requireNonNull(getService(EventPublisher.class)); + ItemRegistry itemRegistry = Objects.requireNonNull(getService(ItemRegistry.class)); CoreModuleHandlerFactory coreModuleHandlerFactory = new CoreModuleHandlerFactory(getBundleContext(), eventPublisher, itemRegistry, mock(TimeZoneProvider.class), mock(StartLevelService.class)); mock(CoreModuleHandlerFactory.class); @@ -206,6 +205,6 @@ public Set getSubscribedEventTypes() { }; ServiceReference subscriberReference = registerService(eventSubscriber).getReference(); - assertNotNull(getServices(EventSubscriber.class, (reference) -> reference.equals(subscriberReference))); + assertNotNull(getServices(EventSubscriber.class, reference -> reference.equals(subscriberReference))); } } diff --git a/itests/org.openhab.core.automation.module.core.tests/src/main/java/org/openhab/core/automation/internal/module/RuntimeRuleTest.java b/itests/org.openhab.core.automation.module.core.tests/src/main/java/org/openhab/core/automation/internal/module/RuntimeRuleTest.java index cca9d6cc15b..866bb066797 100644 --- a/itests/org.openhab.core.automation.module.core.tests/src/main/java/org/openhab/core/automation/internal/module/RuntimeRuleTest.java +++ b/itests/org.openhab.core.automation.module.core.tests/src/main/java/org/openhab/core/automation/internal/module/RuntimeRuleTest.java @@ -14,8 +14,7 @@ import static java.util.Map.entry; import static org.junit.jupiter.api.Assertions.*; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; +import static org.mockito.Mockito.*; import java.util.Collection; import java.util.Collections; @@ -87,8 +86,8 @@ public void before() { startLevelService = mock(StartLevelService.class); when(startLevelService.getStartLevel()).thenReturn(100); registerService(startLevelService, StartLevelService.class.getName()); - EventPublisher eventPublisher = getService(EventPublisher.class); - ItemRegistry itemRegistry = getService(ItemRegistry.class); + EventPublisher eventPublisher = Objects.requireNonNull(getService(EventPublisher.class)); + ItemRegistry itemRegistry = Objects.requireNonNull(getService(ItemRegistry.class)); CoreModuleHandlerFactory coreModuleHandlerFactory = new CoreModuleHandlerFactory(getBundleContext(), eventPublisher, itemRegistry, mock(TimeZoneProvider.class), mock(StartLevelService.class)); mock(CoreModuleHandlerFactory.class); @@ -136,7 +135,7 @@ public Set getSubscribedEventTypes() { }; ServiceReference subscriberReference = registerService(eventSubscriber).getReference(); - assertNotNull(getServices(EventSubscriber.class, (reference) -> reference.equals(subscriberReference))); + assertNotNull(getServices(EventSubscriber.class, reference -> reference.equals(subscriberReference))); } @Test diff --git a/itests/org.openhab.core.automation.module.timer.tests/src/main/java/org/openhab/core/automation/module/timer/internal/BasicConditionHandlerTest.java b/itests/org.openhab.core.automation.module.timer.tests/src/main/java/org/openhab/core/automation/module/timer/internal/BasicConditionHandlerTest.java index 1e1cf933885..a12dfb2b51a 100644 --- a/itests/org.openhab.core.automation.module.timer.tests/src/main/java/org/openhab/core/automation/module/timer/internal/BasicConditionHandlerTest.java +++ b/itests/org.openhab.core.automation.module.timer.tests/src/main/java/org/openhab/core/automation/module/timer/internal/BasicConditionHandlerTest.java @@ -15,8 +15,7 @@ import static org.hamcrest.CoreMatchers.*; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; +import static org.mockito.Mockito.*; import java.util.ArrayList; import java.util.Collection; @@ -91,8 +90,8 @@ public void beforeBase() { startLevelService = mock(StartLevelService.class); when(startLevelService.getStartLevel()).thenReturn(100); registerService(startLevelService, StartLevelService.class.getName()); - EventPublisher eventPublisher = getService(EventPublisher.class); - ItemRegistry itemRegistry = getService(ItemRegistry.class); + EventPublisher eventPublisher = Objects.requireNonNull(getService(EventPublisher.class)); + ItemRegistry itemRegistry = Objects.requireNonNull(getService(ItemRegistry.class)); CoreModuleHandlerFactory coreModuleHandlerFactory = new CoreModuleHandlerFactory(getBundleContext(), eventPublisher, itemRegistry, mock(TimeZoneProvider.class), mock(StartLevelService.class)); mock(CoreModuleHandlerFactory.class); diff --git a/itests/org.openhab.core.automation.module.timer.tests/src/main/java/org/openhab/core/automation/module/timer/internal/DayOfWeekConditionHandlerTest.java b/itests/org.openhab.core.automation.module.timer.tests/src/main/java/org/openhab/core/automation/module/timer/internal/DayOfWeekConditionHandlerTest.java index 61d3c6c54a8..97807370edb 100644 --- a/itests/org.openhab.core.automation.module.timer.tests/src/main/java/org/openhab/core/automation/module/timer/internal/DayOfWeekConditionHandlerTest.java +++ b/itests/org.openhab.core.automation.module.timer.tests/src/main/java/org/openhab/core/automation/module/timer/internal/DayOfWeekConditionHandlerTest.java @@ -23,6 +23,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; +import java.util.Objects; import org.eclipse.jdt.annotation.NonNullByDefault; import org.junit.jupiter.api.BeforeEach; @@ -59,8 +60,8 @@ public DayOfWeekConditionHandlerTest() { @BeforeEach public void before() { - EventPublisher eventPublisher = getService(EventPublisher.class); - ItemRegistry itemRegistry = getService(ItemRegistry.class); + EventPublisher eventPublisher = Objects.requireNonNull(getService(EventPublisher.class)); + ItemRegistry itemRegistry = Objects.requireNonNull(getService(ItemRegistry.class)); CoreModuleHandlerFactory coreModuleHandlerFactory = new CoreModuleHandlerFactory(getBundleContext(), eventPublisher, itemRegistry, mock(TimeZoneProvider.class), mock(StartLevelService.class)); mock(CoreModuleHandlerFactory.class); diff --git a/itests/org.openhab.core.automation.module.timer.tests/src/main/java/org/openhab/core/automation/module/timer/internal/RuntimeRuleTest.java b/itests/org.openhab.core.automation.module.timer.tests/src/main/java/org/openhab/core/automation/module/timer/internal/RuntimeRuleTest.java index 2775e3c7695..197a0117659 100644 --- a/itests/org.openhab.core.automation.module.timer.tests/src/main/java/org/openhab/core/automation/module/timer/internal/RuntimeRuleTest.java +++ b/itests/org.openhab.core.automation.module.timer.tests/src/main/java/org/openhab/core/automation/module/timer/internal/RuntimeRuleTest.java @@ -15,8 +15,7 @@ import static org.hamcrest.CoreMatchers.*; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; +import static org.mockito.Mockito.*; import java.util.Collection; import java.util.HashMap; @@ -83,8 +82,8 @@ public void before() { startLevelService = mock(StartLevelService.class); when(startLevelService.getStartLevel()).thenReturn(100); registerService(startLevelService, StartLevelService.class.getName()); - EventPublisher eventPublisher = getService(EventPublisher.class); - ItemRegistry itemRegistry = getService(ItemRegistry.class); + EventPublisher eventPublisher = Objects.requireNonNull(getService(EventPublisher.class)); + ItemRegistry itemRegistry = Objects.requireNonNull(getService(ItemRegistry.class)); CoreModuleHandlerFactory coreModuleHandlerFactory = new CoreModuleHandlerFactory(getBundleContext(), eventPublisher, itemRegistry, mock(TimeZoneProvider.class), mock(StartLevelService.class)); mock(CoreModuleHandlerFactory.class); @@ -174,7 +173,7 @@ public void receive(Event event) { if (event.getTopic().contains(testItemName)) { itemEvents.add(event); } - }; + } @Override public java.util.Set getSubscribedEventTypes() { diff --git a/itests/org.openhab.core.automation.tests/src/main/java/org/openhab/core/automation/event/RuleEventTest.java b/itests/org.openhab.core.automation.tests/src/main/java/org/openhab/core/automation/event/RuleEventTest.java index 22e4ee1e560..78ef39f2280 100644 --- a/itests/org.openhab.core.automation.tests/src/main/java/org/openhab/core/automation/event/RuleEventTest.java +++ b/itests/org.openhab.core.automation.tests/src/main/java/org/openhab/core/automation/event/RuleEventTest.java @@ -16,8 +16,7 @@ import static org.hamcrest.CoreMatchers.*; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.jupiter.api.Assertions.*; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; +import static org.mockito.Mockito.*; import java.util.ArrayList; import java.util.Collection; @@ -89,8 +88,8 @@ public void before() { startLevelService = mock(StartLevelService.class); when(startLevelService.getStartLevel()).thenReturn(100); registerService(startLevelService, StartLevelService.class.getName()); - EventPublisher eventPublisher = getService(EventPublisher.class); - ItemRegistry itemRegistry = getService(ItemRegistry.class); + EventPublisher eventPublisher = Objects.requireNonNull(getService(EventPublisher.class)); + ItemRegistry itemRegistry = Objects.requireNonNull(getService(ItemRegistry.class)); CoreModuleHandlerFactory coreModuleHandlerFactory = new CoreModuleHandlerFactory(getBundleContext(), eventPublisher, itemRegistry, mock(TimeZoneProvider.class), mock(StartLevelService.class)); mock(CoreModuleHandlerFactory.class); diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/openhab/core/thing/binding/AbstractStorageBasedTypeProviderOSGiTest.java b/itests/org.openhab.core.thing.tests/src/main/java/org/openhab/core/thing/binding/AbstractStorageBasedTypeProviderOSGiTest.java index 5093159484e..9c8232e6c45 100644 --- a/itests/org.openhab.core.thing.tests/src/main/java/org/openhab/core/thing/binding/AbstractStorageBasedTypeProviderOSGiTest.java +++ b/itests/org.openhab.core.thing.tests/src/main/java/org/openhab/core/thing/binding/AbstractStorageBasedTypeProviderOSGiTest.java @@ -13,12 +13,9 @@ package org.openhab.core.thing.binding; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.hasSize; -import static org.hamcrest.Matchers.instanceOf; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.not; -import static org.hamcrest.Matchers.notNullValue; -import static org.hamcrest.Matchers.nullValue; +import static org.hamcrest.Matchers.*; + +import java.util.Objects; import org.eclipse.jdt.annotation.NonNullByDefault; import org.junit.jupiter.api.BeforeEach; @@ -58,8 +55,7 @@ public class AbstractStorageBasedTypeProviderOSGiTest extends JavaOSGiTest { public void setup() { registerVolatileStorageService(); - StorageService storageService = getService(StorageService.class); - assertThat(storageService, is(notNullValue())); + StorageService storageService = Objects.requireNonNull(getService(StorageService.class)); typeProvider = new AbstractStorageBasedTypeProvider(storageService) { }; diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/openhab/core/thing/internal/CommunicationManagerOSGiTest.java b/itests/org.openhab.core.thing.tests/src/main/java/org/openhab/core/thing/internal/CommunicationManagerOSGiTest.java index 3bac9fc85f1..628dafbe7cb 100644 --- a/itests/org.openhab.core.thing.tests/src/main/java/org/openhab/core/thing/internal/CommunicationManagerOSGiTest.java +++ b/itests/org.openhab.core.thing.tests/src/main/java/org/openhab/core/thing/internal/CommunicationManagerOSGiTest.java @@ -104,7 +104,7 @@ protected void addProvider(Provider provider) { } } - private static final UnitProvider unitProviderMock = mock(UnitProvider.class); + private static final UnitProvider UNIT_PROVIDER_MOCK = mock(UnitProvider.class); private static final String EVENT = "event"; private static final String ITEM_NAME_1 = "testItem1"; @@ -116,7 +116,7 @@ protected void addProvider(Provider provider) { private static final SwitchItem ITEM_2 = new SwitchItem(ITEM_NAME_2); private static final NumberItem ITEM_3 = new NumberItem(ITEM_NAME_3); private static final NumberItem ITEM_4 = new NumberItem(ITEM_NAME_4); - private static NumberItem ITEM_5 = new NumberItem(ITEM_NAME_5); // will be replaced later by dimension item + private NumberItem item5 = new NumberItem(ITEM_NAME_5); // will be replaced later by dimension item private static final ThingTypeUID THING_TYPE_UID = new ThingTypeUID("test", "type"); private static final ThingUID THING_UID = new ThingUID("test", "thing"); @@ -167,8 +167,8 @@ protected void addProvider(Provider provider) { @BeforeEach public void beforeEach() { - when(unitProviderMock.getUnit(Temperature.class)).thenReturn(SIUnits.CELSIUS); - ITEM_5 = new NumberItem("Number:Temperature", ITEM_NAME_5, unitProviderMock); + when(UNIT_PROVIDER_MOCK.getUnit(Temperature.class)).thenReturn(SIUnits.CELSIUS); + item5 = new NumberItem("Number:Temperature", ITEM_NAME_5, UNIT_PROVIDER_MOCK); safeCaller = getService(SafeCaller.class); assertNotNull(safeCaller); @@ -179,7 +179,7 @@ public void beforeEach() { manager = new CommunicationManager(autoUpdateManagerMock, channelTypeRegistryMock, profileFactory, iclRegistry, itemRegistryMock, itemStateConverterMock, eventPublisherMock, safeCaller, thingRegistryMock, - unitProviderMock); + UNIT_PROVIDER_MOCK); doAnswer(invocation -> { switch (((Channel) invocation.getArguments()[0]).getKind()) { @@ -227,7 +227,7 @@ public Collection getAll() { when(itemRegistryMock.get(eq(ITEM_NAME_2))).thenReturn(ITEM_2); when(itemRegistryMock.get(eq(ITEM_NAME_3))).thenReturn(ITEM_3); when(itemRegistryMock.get(eq(ITEM_NAME_4))).thenReturn(ITEM_4); - when(itemRegistryMock.get(eq(ITEM_NAME_5))).thenReturn(ITEM_5); + when(itemRegistryMock.get(eq(ITEM_NAME_5))).thenReturn(item5); ChannelType channelType4 = mock(ChannelType.class); when(channelType4.getItemType()).thenReturn("Number:Temperature"); @@ -238,7 +238,7 @@ public Collection getAll() { when(thingRegistryMock.get(eq(THING_UID))).thenReturn(THING); - manager.addItemFactory(new CoreItemFactory(unitProviderMock)); + manager.addItemFactory(new CoreItemFactory(UNIT_PROVIDER_MOCK)); } @Test @@ -307,7 +307,7 @@ public void testItemCommandEventDecimal2Quantity() { public void testItemCommandEventDecimal2Quantity2() { MetadataKey key = new MetadataKey(NumberItem.UNIT_METADATA_NAMESPACE, ITEM_NAME_5); Metadata metadata = new Metadata(key, ImperialUnits.FAHRENHEIT.toString(), null); - ITEM_5.addedMetadata(metadata); + item5.addedMetadata(metadata); manager.receive(ItemEventFactory.createCommandEvent(ITEM_NAME_5, DecimalType.valueOf("20"))); waitForAssert(() -> { From 9cc7b58ac0e81dec068ac8affc114470a418e96f Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Sun, 27 Aug 2023 11:16:04 +0200 Subject: [PATCH 13/22] Fix linuxsysfs itest failing when serial device is connected (#3782) This fixes that some linuxsysfs tests always fail on Linux whenever a real serial device is connected. Due to the changes in #3290 the tests would also scan the actual devices causing tests to fail due to unexpected results. Signed-off-by: Wouter Born --- .../linuxsysfs/internal/SysfsUsbSerialScanner.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.core.config.discovery.usbserial.linuxsysfs/src/main/java/org/openhab/core/config/discovery/usbserial/linuxsysfs/internal/SysfsUsbSerialScanner.java b/bundles/org.openhab.core.config.discovery.usbserial.linuxsysfs/src/main/java/org/openhab/core/config/discovery/usbserial/linuxsysfs/internal/SysfsUsbSerialScanner.java index 3efdb8389ed..88c34ad756e 100644 --- a/bundles/org.openhab.core.config.discovery.usbserial.linuxsysfs/src/main/java/org/openhab/core/config/discovery/usbserial/linuxsysfs/internal/SysfsUsbSerialScanner.java +++ b/bundles/org.openhab.core.config.discovery.usbserial.linuxsysfs/src/main/java/org/openhab/core/config/discovery/usbserial/linuxsysfs/internal/SysfsUsbSerialScanner.java @@ -67,10 +67,11 @@ public class SysfsUsbSerialScanner implements UsbSerialScanner { private static final String SYSFS_TTY_DEVICES_DIRECTORY_DEFAULT = "/sys/class/tty"; private static final String DEV_DIRECTORY_DEFAULT = "/dev"; - private static final String DEV_SERIAL_BY_ID_DIRECTORY = DEV_DIRECTORY_DEFAULT + "/serial/by-id"; + private static final String SERIAL_BY_ID_DIRECTORY = "/serial/by-id"; private String sysfsTtyDevicesDirectory = SYSFS_TTY_DEVICES_DIRECTORY_DEFAULT; private String devDirectory = DEV_DIRECTORY_DEFAULT; + private String devSerialByIdDirectory = DEV_DIRECTORY_DEFAULT + SERIAL_BY_ID_DIRECTORY; private static final String SYSFS_FILENAME_USB_VENDOR_ID = "idVendor"; private static final String SYSFS_FILENAME_USB_PRODUCT_ID = "idProduct"; @@ -151,7 +152,7 @@ private Set getSerialPortInfos() throws IOException { } // optionally compute links and their corresponding SerialInfo : - Path devSerialDir = Path.of(DEV_SERIAL_BY_ID_DIRECTORY); + Path devSerialDir = Path.of(devSerialByIdDirectory); if (exists(devSerialDir) && isDirectory(devSerialDir) && isReadable(devSerialDir)) { // browse serial/by-id directory : try (DirectoryStream directoryStream = newDirectoryStream(devSerialDir)) { @@ -284,6 +285,7 @@ private void extractConfiguration(Map config) { if (configurationIsChanged) { sysfsTtyDevicesDirectory = newSysfsTtyDevicesDirectory; devDirectory = newDevDirectory; + devSerialByIdDirectory = devDirectory + SERIAL_BY_ID_DIRECTORY; } if (!canPerformScans()) { From b426cccf9c9c2c122fcaaffb56533615e7503f52 Mon Sep 17 00:00:00 2001 From: J-N-K Date: Mon, 28 Aug 2023 09:26:52 +0200 Subject: [PATCH 14/22] Fix GenericThingProvider (#3779) When things from multiple handler factories are provisioned from the same file the internal thing map was not properly updated. Signed-off-by: Jan N. Klug --- .../core/model/thing/internal/GenericThingProvider.xtend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.core.model.thing/src/org/openhab/core/model/thing/internal/GenericThingProvider.xtend b/bundles/org.openhab.core.model.thing/src/org/openhab/core/model/thing/internal/GenericThingProvider.xtend index e07b8fd5dc4..ff49a98dba6 100644 --- a/bundles/org.openhab.core.model.thing/src/org/openhab/core/model/thing/internal/GenericThingProvider.xtend +++ b/bundles/org.openhab.core.model.thing/src/org/openhab/core/model/thing/internal/GenericThingProvider.xtend @@ -614,9 +614,9 @@ class GenericThingProvider extends AbstractProviderLazyNullness implement createThing(newThings, factory) ] } - thingsMap.put(modelName, newThings) newThings.forEach [ newThing | + thingsMap.get(modelName).add(newThing) val oldThing = oldThings.findFirst[it.UID == newThing.UID] if (oldThing !== null) { if (!ThingHelper.equals(oldThing, newThing)) { From a0eeed9292298b9a44dd752810e7b97e8de0f2e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Aug 2023 09:41:50 +0200 Subject: [PATCH 15/22] Bump org.apache.ivy:ivy in /bundles/org.openhab.core.semantics (#3773) Bumps org.apache.ivy:ivy from 2.5.1 to 2.5.2. --- updated-dependencies: - dependency-name: org.apache.ivy:ivy dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- bundles/org.openhab.core.semantics/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.core.semantics/pom.xml b/bundles/org.openhab.core.semantics/pom.xml index 6388ba0e3a9..f737fed3136 100644 --- a/bundles/org.openhab.core.semantics/pom.xml +++ b/bundles/org.openhab.core.semantics/pom.xml @@ -52,7 +52,7 @@ org.apache.ivy ivy - 2.5.1 + 2.5.2 org.codehaus.groovy From f8b52ea3f6c96b319d30fbe3d2b8a545335c368a Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Mon, 28 Aug 2023 22:30:56 +0200 Subject: [PATCH 16/22] Use JUnit TempDir which automatically removes temp dirs (#3786) --- .../common/osgi/ResourceBundleClassLoaderTest.java | 11 ++++++----- .../plugin/GenerateDefaultTranslationsMojoTest.java | 12 ++---------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/bundles/org.openhab.core/src/test/java/org/openhab/core/common/osgi/ResourceBundleClassLoaderTest.java b/bundles/org.openhab.core/src/test/java/org/openhab/core/common/osgi/ResourceBundleClassLoaderTest.java index 5c9a5a8e72c..89ca58745b6 100644 --- a/bundles/org.openhab.core/src/test/java/org/openhab/core/common/osgi/ResourceBundleClassLoaderTest.java +++ b/bundles/org.openhab.core/src/test/java/org/openhab/core/common/osgi/ResourceBundleClassLoaderTest.java @@ -18,7 +18,6 @@ import java.io.File; import java.net.URL; -import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Collections; @@ -26,6 +25,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; import org.osgi.framework.Bundle; /** @@ -34,7 +34,9 @@ @NonNullByDefault public class ResourceBundleClassLoaderTest { - static URL createTmpTestPropetiesFile(Path root, String relativeFile) throws Exception { + private @TempDir @NonNullByDefault({}) Path tempDir; + + static URL createTmpTestPropertiesFile(Path root, String relativeFile) throws Exception { Path filePath = Paths.get(relativeFile); Path dirPath = filePath.getParent(); @@ -47,9 +49,8 @@ static URL createTmpTestPropetiesFile(Path root, String relativeFile) throws Exc @Test public void testName() throws Exception { - Path tmp = Files.createTempDirectory("tmp"); - URL hostPropertiesURL = createTmpTestPropetiesFile(tmp, "host/OH-INF/i18n/test.properties"); - URL fragmentPropertiesURL = createTmpTestPropetiesFile(tmp, "fragment/OH-INF/i18n/test.properties"); + URL hostPropertiesURL = createTmpTestPropertiesFile(tempDir, "host/OH-INF/i18n/test.properties"); + URL fragmentPropertiesURL = createTmpTestPropertiesFile(tempDir, "fragment/OH-INF/i18n/test.properties"); Bundle bundleMock = mock(Bundle.class); when(bundleMock.findEntries(any(), any(), anyBoolean())) diff --git a/tools/i18n-plugin/src/test/java/org/openhab/core/tools/i18n/plugin/GenerateDefaultTranslationsMojoTest.java b/tools/i18n-plugin/src/test/java/org/openhab/core/tools/i18n/plugin/GenerateDefaultTranslationsMojoTest.java index 2e5274de452..ac42058f9d5 100644 --- a/tools/i18n-plugin/src/test/java/org/openhab/core/tools/i18n/plugin/GenerateDefaultTranslationsMojoTest.java +++ b/tools/i18n-plugin/src/test/java/org/openhab/core/tools/i18n/plugin/GenerateDefaultTranslationsMojoTest.java @@ -17,22 +17,20 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.openhab.core.tools.i18n.plugin.DefaultTranslationsGenerationMode.*; -import java.io.File; import java.io.IOException; import java.io.UncheckedIOException; import java.nio.file.DirectoryStream; import java.nio.file.Files; import java.nio.file.Path; -import java.util.Comparator; import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugin.logging.SystemStreamLog; import org.eclipse.jdt.annotation.NonNullByDefault; -import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * Tests {@link GenerateDefaultTranslationsMojo}. @@ -42,7 +40,7 @@ @NonNullByDefault public class GenerateDefaultTranslationsMojoTest { - public @NonNullByDefault({}) Path tempPath; + public @TempDir @NonNullByDefault({}) Path tempPath; public @NonNullByDefault({}) Path tempI18nPath; public static final Path TTS_RESOURCES_PATH = Path.of("src/test/resources/acmetts.bundle"); @@ -95,7 +93,6 @@ private void deleteTempI18nPath() throws IOException { @BeforeEach public void before() throws IOException { - tempPath = Files.createTempDirectory("i18n-"); tempI18nPath = tempPath.resolve("OH-INF/i18n"); mojo = new GenerateDefaultTranslationsMojo(); @@ -104,11 +101,6 @@ public void before() throws IOException { mojo.setTargetDirectory(tempI18nPath.toFile()); } - @AfterEach - public void afterEach() throws IOException { - Files.walk(tempPath).sorted(Comparator.reverseOrder()).map(Path::toFile).forEach(File::delete); - } - private void assertSameProperties(Path expectedPath, Path actualPath) throws IOException { String expected = Files.readAllLines(expectedPath).stream().collect(Collectors.joining(System.lineSeparator())); String actual = Files.readAllLines(actualPath).stream().collect(Collectors.joining(System.lineSeparator())); From e765af06cb7678475ff7ce61ca64b11855ef9329 Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Wed, 30 Aug 2023 13:29:34 +0200 Subject: [PATCH 17/22] Upgrade Maven and plug-ins (#3788) * Use Maven 3.9.4 with GitHub Actions CI * Upgrade Maven plug-ins Signed-off-by: Wouter Born --- .github/workflows/ci-build.yml | 2 +- bundles/pom.xml | 2 +- itests/pom.xml | 2 +- pom.xml | 77 ++++++++++++++++++---------------- 4 files changed, 44 insertions(+), 39 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 22ad0b09ee5..b6dba7f6b52 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -19,7 +19,7 @@ jobs: fail-fast: false matrix: java: [ '17' ] - maven: [ '3.8.6' ] + maven: [ '3.9.4' ] os: [ 'ubuntu-22.04' ] name: Build (Java ${{ matrix.java }}, ${{ matrix.os }}) runs-on: ${{ matrix.os }} diff --git a/bundles/pom.xml b/bundles/pom.xml index 7ca14f22cac..70000056d92 100644 --- a/bundles/pom.xml +++ b/bundles/pom.xml @@ -159,7 +159,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.3.0 + 3.6.0 unpack-eea diff --git a/itests/pom.xml b/itests/pom.xml index 3045fa283a3..f6884de2a79 100644 --- a/itests/pom.xml +++ b/itests/pom.xml @@ -95,7 +95,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.1.1 + 3.6.0 unpack-eea diff --git a/pom.xml b/pom.xml index 1c090499277..48eedd4f2ad 100644 --- a/pom.xml +++ b/pom.xml @@ -77,7 +77,7 @@ 0.15.0 1.7.32 2.29.0 - 2.37.0 + 2.38.0 4.25 4.21.0 @@ -271,13 +271,13 @@ Import-Package: \\ org.apache.maven.plugins maven-clean-plugin - 3.0.0 + 3.3.1 org.apache.maven.plugins maven-compiler-plugin - 3.10.1 + 3.11.0 eclipse @@ -308,19 +308,19 @@ Import-Package: \\ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0-M2 + 3.4.0 org.apache.maven.plugins maven-install-plugin - 2.5.2 + 3.1.1 org.apache.maven.plugins maven-jar-plugin - 3.0.2 + 3.3.0 @@ -357,13 +357,13 @@ Import-Package: \\ org.apache.maven.plugins maven-plugin-plugin - 3.6.0 + 3.9.0 org.apache.maven.plugins maven-release-plugin - 2.5.2 + 3.0.1 clean install @@ -372,25 +372,25 @@ Import-Package: \\ org.apache.maven.plugins maven-resources-plugin - 3.0.2 + 3.3.1 org.apache.maven.plugins maven-site-plugin - 3.7.1 + 3.12.1 org.apache.maven.plugins maven-source-plugin - 3.0.1 + 3.3.0 org.apache.maven.plugins maven-surefire-plugin - 3.0.0 + 3.1.2 --add-opens java.base/java.net=ALL-UNNAMED @@ -425,50 +425,55 @@ Import-Package: \\ org.codehaus.mojo build-helper-maven-plugin - 3.0.0 + 3.4.0 com.mycila license-maven-plugin - 3.0 + 4.2 ${basedir} -
licenses/epl-2.0/header.txt
false true true true JAVADOC_STYLE + JAVADOC_STYLE JAVADOC_STYLE JAVADOC_STYLE xml-header-style - - licenses/epl-2.0/xml-header-style.xml - - - **/archetype/**/*.groovy - **/org/openhab/core/**/*.java - **/org/openhab/core/**/*.mwe2 - **/org/openhab/core/**/*.xtend - **/org/openhab/**/*.java - **/org.openhab.core.semantics/**/*.groovy - **/feature.xml - **/OSGI-INF/*.xml - - - target/** - **/pom.xml - _*.java - **/archetype/**/feature.xml - true 2023 UTF-8 + + +
licenses/epl-2.0/header.txt
+ + licenses/epl-2.0/xml-header-style.xml + + + **/archetype/**/*.groovy + **/org/openhab/core/**/*.java + **/org/openhab/core/**/*.mwe2 + **/org/openhab/core/**/*.xtend + **/org/openhab/**/*.java + **/org.openhab.core.semantics/**/*.groovy + **/feature.xml + **/OSGI-INF/*.xml + + + target/** + **/pom.xml + _*.java + **/archetype/**/feature.xml + +
+
@@ -482,7 +487,7 @@ Import-Package: \\ org.openhab.core.tools i18n-maven-plugin - 3.3.0 + 4.0.2 @@ -512,7 +517,7 @@ Import-Package: \\ com.github.ekryd.sortpom sortpom-maven-plugin - 2.10.0 + 3.3.0 recommended_2008_06 false From 3ddbdb25ed274bcd3a9fc02899efee6bc6de72eb Mon Sep 17 00:00:00 2001 From: Gwendal Roulleau Date: Wed, 30 Aug 2023 14:23:35 +0200 Subject: [PATCH 18/22] [cache] Fix concurrent use of a cache entry (#3785) Closes #3507 Fix some rare case where the concurrent readings of a cache entry can fail. Signed-off-by: Gwendal Roulleau --- .../java/org/openhab/core/cache/lru/LRUMediaCacheEntry.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.core/src/main/java/org/openhab/core/cache/lru/LRUMediaCacheEntry.java b/bundles/org.openhab.core/src/main/java/org/openhab/core/cache/lru/LRUMediaCacheEntry.java index 8bf60773cc8..04bb68dba93 100644 --- a/bundles/org.openhab.core/src/main/java/org/openhab/core/cache/lru/LRUMediaCacheEntry.java +++ b/bundles/org.openhab.core/src/main/java/org/openhab/core/cache/lru/LRUMediaCacheEntry.java @@ -296,7 +296,7 @@ protected byte[] read(int start, int sizeToRead) throws IOException { } } // the cache file is now filled, get bytes from it. - long maxToRead = Math.min(currentSize, sizeToRead); + long maxToRead = Math.min(fileChannelLocal.size(), sizeToRead); ByteBuffer byteBufferFromChannelFile = ByteBuffer.allocate((int) maxToRead); int byteReadNumber = fileChannelLocal.read(byteBufferFromChannelFile, Integer.valueOf(start).longValue()); logger.trace("Read {} bytes from the filechannel", byteReadNumber); From d7fbb944904c484334cd36c27fef1e7fe9522d26 Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Wed, 30 Aug 2023 22:39:21 +0200 Subject: [PATCH 19/22] Update Swagger to 2.2.15 (#3789) Updates Swagger from 2.1.9 to 2.2.15. This adds OpenAPI v3.1 support. For more release notes see: https://github.com/swagger-api/swagger-core/releases Signed-off-by: Wouter Born --- bom/compile/pom.xml | 2 +- bom/runtime/pom.xml | 4 ++-- .../karaf/openhab-tp/src/main/feature/feature.xml | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bom/compile/pom.xml b/bom/compile/pom.xml index e8955e19315..3cef1119431 100644 --- a/bom/compile/pom.xml +++ b/bom/compile/pom.xml @@ -20,7 +20,7 @@ 2.7.4 9.4.50.v20221201 8.0.15 - 2.1.9 + 2.2.15 diff --git a/bom/runtime/pom.xml b/bom/runtime/pom.xml index dcc8ff13644..8235f5c492e 100644 --- a/bom/runtime/pom.xml +++ b/bom/runtime/pom.xml @@ -22,7 +22,7 @@ 9.4.50.v20221201 2.2.0 8.0.15 - 2.1.9 + 2.2.15 @@ -1068,7 +1068,7 @@ org.javassist javassist - 3.27.0-GA + 3.29.2-GA compile diff --git a/features/karaf/openhab-tp/src/main/feature/feature.xml b/features/karaf/openhab-tp/src/main/feature/feature.xml index ab2b8ac495d..0c2401c795e 100644 --- a/features/karaf/openhab-tp/src/main/feature/feature.xml +++ b/features/karaf/openhab-tp/src/main/feature/feature.xml @@ -287,16 +287,16 @@
- openhab.tp;feature=swagger-jaxrs;version=2.1.9 + openhab.tp;feature=swagger-jaxrs;version=2.2.15 openhab.tp-jax-rs-whiteboard openhab.tp-jackson - mvn:io.swagger.core.v3/swagger-annotations/2.1.9 - mvn:io.swagger.core.v3/swagger-core/2.1.9 - mvn:io.swagger.core.v3/swagger-integration/2.1.9 - mvn:io.swagger.core.v3/swagger-jaxrs2/2.1.9 - mvn:io.swagger.core.v3/swagger-models/2.1.9 + mvn:io.swagger.core.v3/swagger-annotations/2.2.15 + mvn:io.swagger.core.v3/swagger-core/2.2.15 + mvn:io.swagger.core.v3/swagger-integration/2.2.15 + mvn:io.swagger.core.v3/swagger-jaxrs2/2.2.15 + mvn:io.swagger.core.v3/swagger-models/2.2.15 mvn:jakarta.validation/jakarta.validation-api/2.0.2 - mvn:org.javassist/javassist/3.27.0-GA + mvn:org.javassist/javassist/3.29.2-GA From c39d15ade62ebf4fef13e87edc4415f889c9252f Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Wed, 30 Aug 2023 22:50:17 +0200 Subject: [PATCH 20/22] Cleanup code (#3787) This code cleanup fixes various warnings in Eclipse. Signed-off-by: Wouter Born --- .../loader/AbstractScriptFileWatcherTest.java | 5 +---- .../handler/ItemStateConditionHandler.java | 14 ++++++-------- .../handler/SystemTriggerHandlerTest.java | 14 ++++++-------- ...onfigDescriptionParameterGroupBuilder.java | 1 - .../config/core/ConfigurationSerializer.java | 1 - .../BitUtilitiesCommandToRegistersTest.java | 2 +- ...tilitiesExtractStateFromRegistersTest.java | 2 +- .../test/BitUtilitiesExtractStringTest.java | 4 ++-- .../core/persistence/dto/ItemHistoryDTO.java | 3 +-- .../thing/internal/CommunicationManager.java | 9 +-------- .../xml/internal/ThingDescriptionList.java | 2 +- .../internal/items/MetadataRegistryImpl.java | 2 +- .../core/library/types/QuantityType.java | 19 ++++++++----------- .../core/library/items/NumberItemTest.java | 4 ++-- .../StateDescriptionFragmentBuilderTest.java | 1 - .../CommunicationManagerOSGiTest.java | 9 ++------- 16 files changed, 33 insertions(+), 59 deletions(-) diff --git a/bundles/org.openhab.core.automation.module.script.rulesupport/src/test/java/org/openhab/core/automation/module/script/rulesupport/loader/AbstractScriptFileWatcherTest.java b/bundles/org.openhab.core.automation.module.script.rulesupport/src/test/java/org/openhab/core/automation/module/script/rulesupport/loader/AbstractScriptFileWatcherTest.java index 10f3ef1411c..878c20762c9 100644 --- a/bundles/org.openhab.core.automation.module.script.rulesupport/src/test/java/org/openhab/core/automation/module/script/rulesupport/loader/AbstractScriptFileWatcherTest.java +++ b/bundles/org.openhab.core.automation.module.script.rulesupport/src/test/java/org/openhab/core/automation/module/script/rulesupport/loader/AbstractScriptFileWatcherTest.java @@ -12,16 +12,13 @@ */ package org.openhab.core.automation.module.script.rulesupport.loader; -import static java.nio.file.StandardWatchEventKinds.*; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import static org.junit.jupiter.api.Assertions.fail; import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.*; import static org.openhab.core.OpenHAB.CONFIG_DIR_PROG_ARGUMENT; -import static org.openhab.core.service.WatchService.Kind.CREATE; -import static org.openhab.core.service.WatchService.Kind.DELETE; -import static org.openhab.core.service.WatchService.Kind.MODIFY; +import static org.openhab.core.service.WatchService.Kind.*; import java.io.File; import java.io.IOException; diff --git a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/module/handler/ItemStateConditionHandler.java b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/module/handler/ItemStateConditionHandler.java index e55a91e6118..c48fe7b98ef 100644 --- a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/module/handler/ItemStateConditionHandler.java +++ b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/module/handler/ItemStateConditionHandler.java @@ -112,12 +112,10 @@ public void receive(Event event) { module.getId()); return; } - } else if (event instanceof ItemRemovedEvent removedEvent) { - if (itemName.equals(removedEvent.getItem().name)) { - logger.warn("Item '{}' needed for rule '{}' removed. Condition '{}' will no longer work.", itemName, - ruleUID, module.getId()); - return; - } + } else if ((event instanceof ItemRemovedEvent removedEvent) && itemName.equals(removedEvent.getItem().name)) { + logger.warn("Item '{}' needed for rule '{}' removed. Condition '{}' will no longer work.", itemName, + ruleUID, module.getId()); + return; } } @@ -155,7 +153,7 @@ public boolean isSatisfied(Map inputs) { return false; } - @SuppressWarnings({ "rawtypes", "unchecked", "null" }) + @SuppressWarnings("unchecked") private boolean lessThanOrEqualsToItemState(String itemName, String state) throws ItemNotFoundException { Item item = itemRegistry.getItem(itemName); State compareState = TypeParser.parseState(item.getAcceptedDataTypes(), state); @@ -192,7 +190,7 @@ private boolean lessThanOrEqualsToItemState(String itemName, String state) throw return false; } - @SuppressWarnings({ "rawtypes", "unchecked", "null" }) + @SuppressWarnings("unchecked") private boolean greaterThanOrEqualsToItemState(String itemName, String state) throws ItemNotFoundException { Item item = itemRegistry.getItem(itemName); State compareState = TypeParser.parseState(item.getAcceptedDataTypes(), state); diff --git a/bundles/org.openhab.core.automation/src/test/java/org/openhab/core/automation/internal/module/handler/SystemTriggerHandlerTest.java b/bundles/org.openhab.core.automation/src/test/java/org/openhab/core/automation/internal/module/handler/SystemTriggerHandlerTest.java index 8bee91cf982..8961a7ccdf8 100644 --- a/bundles/org.openhab.core.automation/src/test/java/org/openhab/core/automation/internal/module/handler/SystemTriggerHandlerTest.java +++ b/bundles/org.openhab.core.automation/src/test/java/org/openhab/core/automation/internal/module/handler/SystemTriggerHandlerTest.java @@ -15,10 +15,7 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyNoInteractions; -import static org.mockito.Mockito.verifyNoMoreInteractions; -import static org.mockito.Mockito.when; +import static org.mockito.Mockito.*; import java.util.Map; @@ -27,6 +24,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.ArgumentCaptor; +import org.mockito.Captor; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.junit.jupiter.MockitoSettings; @@ -56,6 +54,8 @@ public class SystemTriggerHandlerTest { private @Mock @NonNullByDefault({}) Trigger triggerMock; + private @Captor @NonNullByDefault({}) ArgumentCaptor> captor; + @BeforeEach public void setup() { when(triggerMock.getConfiguration()) @@ -96,10 +96,9 @@ public void testDoesTriggerIfStartLevelEventHigher() { Event event = SystemEventFactory.createStartlevelEvent(100); triggerHandler.receive(event); - ArgumentCaptor captor = ArgumentCaptor.forClass(Map.class); verify(callbackMock).triggered(eq(triggerMock), captor.capture()); - Map configuration = (Map) captor.getValue(); + Map configuration = captor.getValue(); assertThat(configuration.get(SystemTriggerHandler.OUT_STARTLEVEL), is(CFG_STARTLEVEL)); } @@ -113,10 +112,9 @@ public void testDoesNotTriggerAfterEventTrigger() { Event event = SystemEventFactory.createStartlevelEvent(100); triggerHandler.receive(event); - ArgumentCaptor captor = ArgumentCaptor.forClass(Map.class); verify(callbackMock).triggered(eq(triggerMock), captor.capture()); - Map configuration = (Map) captor.getValue(); + Map configuration = captor.getValue(); assertThat(configuration.get(SystemTriggerHandler.OUT_STARTLEVEL), is(CFG_STARTLEVEL)); triggerHandler.receive(event); diff --git a/bundles/org.openhab.core.config.core/src/main/java/org/openhab/core/config/core/ConfigDescriptionParameterGroupBuilder.java b/bundles/org.openhab.core.config.core/src/main/java/org/openhab/core/config/core/ConfigDescriptionParameterGroupBuilder.java index c5d043626d0..920531a99b3 100644 --- a/bundles/org.openhab.core.config.core/src/main/java/org/openhab/core/config/core/ConfigDescriptionParameterGroupBuilder.java +++ b/bundles/org.openhab.core.config.core/src/main/java/org/openhab/core/config/core/ConfigDescriptionParameterGroupBuilder.java @@ -93,7 +93,6 @@ public ConfigDescriptionParameterGroupBuilder withDescription(@Nullable String d * * @return the desired result */ - @SuppressWarnings("deprecation") public ConfigDescriptionParameterGroup build() throws IllegalArgumentException { return new ConfigDescriptionParameterGroup(name, context, advanced != null ? advanced : false, label, description); diff --git a/bundles/org.openhab.core.config.core/src/main/java/org/openhab/core/config/core/ConfigurationSerializer.java b/bundles/org.openhab.core.config.core/src/main/java/org/openhab/core/config/core/ConfigurationSerializer.java index 53069f26eca..fbee48d0c62 100644 --- a/bundles/org.openhab.core.config.core/src/main/java/org/openhab/core/config/core/ConfigurationSerializer.java +++ b/bundles/org.openhab.core.config.core/src/main/java/org/openhab/core/config/core/ConfigurationSerializer.java @@ -32,7 +32,6 @@ */ public class ConfigurationSerializer implements JsonSerializer { - @SuppressWarnings("unchecked") @Override public JsonElement serialize(Configuration src, Type typeOfSrc, JsonSerializationContext context) { JsonObject result = new JsonObject(); diff --git a/bundles/org.openhab.core.io.transport.modbus/src/test/java/org/openhab/core/io/transport/modbus/test/BitUtilitiesCommandToRegistersTest.java b/bundles/org.openhab.core.io.transport.modbus/src/test/java/org/openhab/core/io/transport/modbus/test/BitUtilitiesCommandToRegistersTest.java index 00d99baa6c0..5e94246de9d 100644 --- a/bundles/org.openhab.core.io.transport.modbus/src/test/java/org/openhab/core/io/transport/modbus/test/BitUtilitiesCommandToRegistersTest.java +++ b/bundles/org.openhab.core.io.transport.modbus/src/test/java/org/openhab/core/io/transport/modbus/test/BitUtilitiesCommandToRegistersTest.java @@ -322,7 +322,7 @@ public static Stream data() { ); } - @SuppressWarnings({ "unchecked", "rawtypes" }) + @SuppressWarnings("unchecked") @ParameterizedTest @MethodSource("data") public void testCommandToRegisters(Command command, ValueType type, Object expectedResult) { diff --git a/bundles/org.openhab.core.io.transport.modbus/src/test/java/org/openhab/core/io/transport/modbus/test/BitUtilitiesExtractStateFromRegistersTest.java b/bundles/org.openhab.core.io.transport.modbus/src/test/java/org/openhab/core/io/transport/modbus/test/BitUtilitiesExtractStateFromRegistersTest.java index ecfd9cdee1d..acaf4768aba 100644 --- a/bundles/org.openhab.core.io.transport.modbus/src/test/java/org/openhab/core/io/transport/modbus/test/BitUtilitiesExtractStateFromRegistersTest.java +++ b/bundles/org.openhab.core.io.transport.modbus/src/test/java/org/openhab/core/io/transport/modbus/test/BitUtilitiesExtractStateFromRegistersTest.java @@ -354,7 +354,7 @@ ValueType.INT64_SWAP, shortArrayToRegisterArray(0x0, 0x0, 0x8, 0x0), 0 }, .collect(Collectors.toList())); } - @SuppressWarnings({ "unchecked", "rawtypes" }) + @SuppressWarnings("unchecked") @ParameterizedTest @MethodSource("data") public void testextractStateFromRegisters(Object expectedResult, ValueType type, ModbusRegisterArray registers, diff --git a/bundles/org.openhab.core.io.transport.modbus/src/test/java/org/openhab/core/io/transport/modbus/test/BitUtilitiesExtractStringTest.java b/bundles/org.openhab.core.io.transport.modbus/src/test/java/org/openhab/core/io/transport/modbus/test/BitUtilitiesExtractStringTest.java index e4e14729211..0338c9daa54 100644 --- a/bundles/org.openhab.core.io.transport.modbus/src/test/java/org/openhab/core/io/transport/modbus/test/BitUtilitiesExtractStringTest.java +++ b/bundles/org.openhab.core.io.transport.modbus/src/test/java/org/openhab/core/io/transport/modbus/test/BitUtilitiesExtractStringTest.java @@ -103,7 +103,7 @@ public static Stream dataWithByteVariations() { }); } - @SuppressWarnings({ "unchecked", "rawtypes" }) + @SuppressWarnings("unchecked") @ParameterizedTest @MethodSource("data") public void testExtractStringFromRegisters(Object expectedResult, ModbusRegisterArray registers, int index, @@ -119,7 +119,7 @@ public void testExtractStringFromRegisters(Object expectedResult, ModbusRegister } } - @SuppressWarnings({ "unchecked", "rawtypes" }) + @SuppressWarnings("unchecked") @ParameterizedTest @MethodSource("dataWithByteVariations") public void testExtractStringFromBytes(Object expectedResult, int byteOffset, byte[] bytes, int byteIndex, diff --git a/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/dto/ItemHistoryDTO.java b/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/dto/ItemHistoryDTO.java index 949805fe686..0fc11460737 100644 --- a/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/dto/ItemHistoryDTO.java +++ b/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/dto/ItemHistoryDTO.java @@ -32,7 +32,7 @@ public class ItemHistoryDTO { public List data = new ArrayList<>(); public ItemHistoryDTO() { - }; + } /** * Add a new record to the data history. @@ -41,7 +41,6 @@ public ItemHistoryDTO() { * @param time the time of the record * @param state the state at this time */ - @SuppressWarnings("rawtypes") public void addData(Long time, State state) { HistoryDataBean newVal = new HistoryDataBean(); newVal.time = time; diff --git a/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/internal/CommunicationManager.java b/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/internal/CommunicationManager.java index 8b2bf6ba0a6..1823f28a0f1 100644 --- a/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/internal/CommunicationManager.java +++ b/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/internal/CommunicationManager.java @@ -35,7 +35,6 @@ import org.openhab.core.events.Event; import org.openhab.core.events.EventPublisher; import org.openhab.core.events.EventSubscriber; -import org.openhab.core.i18n.UnitProvider; import org.openhab.core.items.Item; import org.openhab.core.items.ItemFactory; import org.openhab.core.items.ItemRegistry; @@ -73,7 +72,6 @@ import org.openhab.core.thing.profiles.ProfileTypeUID; import org.openhab.core.thing.profiles.StateProfile; import org.openhab.core.thing.profiles.TriggerProfile; -import org.openhab.core.thing.type.ChannelTypeRegistry; import org.openhab.core.types.Command; import org.openhab.core.types.State; import org.openhab.core.types.Type; @@ -123,7 +121,6 @@ public void onStateUpdateFromItem(State state) { private final Logger logger = LoggerFactory.getLogger(CommunicationManager.class); private final AutoUpdateManager autoUpdateManager; - private final ChannelTypeRegistry channelTypeRegistry; private final SystemProfileFactory defaultProfileFactory; private final ItemChannelLinkRegistry itemChannelLinkRegistry; private final ItemRegistry itemRegistry; @@ -131,22 +128,19 @@ public void onStateUpdateFromItem(State state) { private final EventPublisher eventPublisher; private final SafeCaller safeCaller; private final ThingRegistry thingRegistry; - private final UnitProvider unitProvider; private final ExpiringCacheMap profileSafeCallCache = new ExpiringCacheMap<>(CACHE_EXPIRATION); @Activate public CommunicationManager(final @Reference AutoUpdateManager autoUpdateManager, - final @Reference ChannelTypeRegistry channelTypeRegistry, final @Reference SystemProfileFactory defaultProfileFactory, final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, final @Reference ItemRegistry itemRegistry, // final @Reference ItemStateConverter itemStateConverter, // final @Reference EventPublisher eventPublisher, // final @Reference SafeCaller safeCaller, // - final @Reference ThingRegistry thingRegistry, final @Reference UnitProvider unitProvider) { + final @Reference ThingRegistry thingRegistry) { this.autoUpdateManager = autoUpdateManager; - this.channelTypeRegistry = channelTypeRegistry; this.defaultProfileFactory = defaultProfileFactory; this.itemChannelLinkRegistry = itemChannelLinkRegistry; this.itemRegistry = itemRegistry; @@ -154,7 +148,6 @@ public CommunicationManager(final @Reference AutoUpdateManager autoUpdateManager this.eventPublisher = eventPublisher; this.safeCaller = safeCaller; this.thingRegistry = thingRegistry; - this.unitProvider = unitProvider; itemChannelLinkRegistry.addRegistryChangeListener(this); } diff --git a/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/xml/internal/ThingDescriptionList.java b/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/xml/internal/ThingDescriptionList.java index 7827dc5df92..c13b1054879 100644 --- a/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/xml/internal/ThingDescriptionList.java +++ b/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/xml/internal/ThingDescriptionList.java @@ -23,7 +23,7 @@ * * @author Michael Grammling - Initial contribution */ -@SuppressWarnings({ "serial", "rawtypes" }) +@SuppressWarnings("rawtypes") @NonNullByDefault public class ThingDescriptionList extends ArrayList { diff --git a/bundles/org.openhab.core/src/main/java/org/openhab/core/internal/items/MetadataRegistryImpl.java b/bundles/org.openhab.core/src/main/java/org/openhab/core/internal/items/MetadataRegistryImpl.java index f7cafcf8cd1..60414159598 100644 --- a/bundles/org.openhab.core/src/main/java/org/openhab/core/internal/items/MetadataRegistryImpl.java +++ b/bundles/org.openhab.core/src/main/java/org/openhab/core/internal/items/MetadataRegistryImpl.java @@ -72,7 +72,7 @@ public boolean isInternalNamespace(String namespace) { * @param itemname the name of the item for which the namespaces should be searched. */ @Override - public Collection getAllNamespaces(String itemname) { + public Collection getAllNamespaces(String itemname) { return stream().map(Metadata::getUID).filter(key -> key.getItemName().equals(itemname)) .map(MetadataKey::getNamespace).collect(Collectors.toSet()); } diff --git a/bundles/org.openhab.core/src/main/java/org/openhab/core/library/types/QuantityType.java b/bundles/org.openhab.core/src/main/java/org/openhab/core/library/types/QuantityType.java index 7f983f2e9b5..6be68d8eb2d 100644 --- a/bundles/org.openhab.core/src/main/java/org/openhab/core/library/types/QuantityType.java +++ b/bundles/org.openhab.core/src/main/java/org/openhab/core/library/types/QuantityType.java @@ -184,7 +184,7 @@ private QuantityType(Quantity quantity) { * @return a new {@link QuantityType} */ public static > QuantityType valueOf(double value, Unit unit) { - return new QuantityType(value, unit); + return new QuantityType<>(value, unit); } @Override @@ -204,7 +204,6 @@ public static QuantityType> valueOf(String value) { return new QuantityType<>(value); } - @SuppressWarnings("unchecked") @Override public boolean equals(@Nullable Object obj) { if (this == obj) { @@ -229,7 +228,7 @@ public boolean equals(@Nullable Object obj) { @Override public int compareTo(QuantityType o) { - return internalCompareTo((QuantityType) o); + return internalCompareTo(o); } private int internalCompareTo(QuantityType o) { @@ -269,7 +268,7 @@ public Dimension getDimension() { UnitConverter uc = getUnit().getConverterToAny(targetUnit); Quantity result = Quantities.getQuantity(uc.convert(quantity.getValue()), targetUnit); - return new QuantityType(result.getValue(), (Unit) targetUnit); + return new QuantityType<>(result.getValue(), (Unit) targetUnit); } catch (UnconvertibleException | IncommensurableException e) { logger.debug("Unable to convert unit from {} to {}", getUnit(), targetUnit); return null; @@ -306,7 +305,6 @@ && getUnit().inverse().isCompatible(targetUnit)) { return toUnit(targetUnit); } - @SuppressWarnings("unchecked") public @Nullable QuantityType toInvertibleUnit(String targetUnit) { Unit unit = AbstractUnit.parse(targetUnit); if (unit != null) { @@ -328,7 +326,6 @@ && getUnit().inverse().isCompatible(targetUnit)) { * @param targetUnit the unit to which this {@link QuantityType} will be converted to. * @return the new {@link QuantityType} in the given {@link Unit} or {@code null} in case of an error. */ - @SuppressWarnings("unchecked") public @Nullable QuantityType toUnitRelative(Unit targetUnit) { if (targetUnit.equals(getUnit())) { return this; @@ -338,7 +335,7 @@ && getUnit().inverse().isCompatible(targetUnit)) { } Quantity result = quantity.to(targetUnit); - return new QuantityType(result.getValue(), targetUnit); + return new QuantityType<>(result.getValue(), targetUnit); } public BigDecimal toBigDecimal() { @@ -478,7 +475,7 @@ public String toFullString() { * @return the sum of the given {@link QuantityType} with this QuantityType. */ public QuantityType add(QuantityType state) { - return new QuantityType(this.quantity.add(state.quantity)); + return new QuantityType<>(this.quantity.add(state.quantity)); } /** @@ -497,7 +494,7 @@ public QuantityType negate() { * @return the difference by subtracting the given {@link QuantityType} from this QuantityType. */ public QuantityType subtract(QuantityType state) { - return new QuantityType(this.quantity.subtract(state.quantity)); + return new QuantityType<>(this.quantity.subtract(state.quantity)); } /** @@ -549,12 +546,12 @@ public QuantityType divide(QuantityType state) { public QuantityType offset(QuantityType offset, Unit unit) { final Quantity sum = Arrays.asList(quantity, offset.quantity).stream().reduce(QuantityFunctions.sum(unit)) .get(); - return new QuantityType(sum); + return new QuantityType<>(sum); } /** * Return the reciprocal of this QuantityType. - * + * * @return a QuantityType with both the value and unit reciprocated */ public QuantityType inverse() { diff --git a/bundles/org.openhab.core/src/test/java/org/openhab/core/library/items/NumberItemTest.java b/bundles/org.openhab.core/src/test/java/org/openhab/core/library/items/NumberItemTest.java index c69f3e95d1c..59ff1041c15 100644 --- a/bundles/org.openhab.core/src/test/java/org/openhab/core/library/items/NumberItemTest.java +++ b/bundles/org.openhab.core/src/test/java/org/openhab/core/library/items/NumberItemTest.java @@ -12,8 +12,9 @@ */ package org.openhab.core.library.items; -import static org.hamcrest.CoreMatchers.*; +import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.*; import java.util.Objects; @@ -68,7 +69,6 @@ public class NumberItemTest { private final UnitProvider unitProvider = new TestUnitProvider(); @BeforeEach - @SuppressWarnings("unchecked") public void setup() { when(stateDescriptionServiceMock.getStateDescription(ITEM_NAME, null)) .thenReturn(StateDescriptionFragmentBuilder.create().withPattern("%.1f " + UnitUtils.UNIT_PLACEHOLDER) diff --git a/bundles/org.openhab.core/src/test/java/org/openhab/core/types/StateDescriptionFragmentBuilderTest.java b/bundles/org.openhab.core/src/test/java/org/openhab/core/types/StateDescriptionFragmentBuilderTest.java index da4c97e6a2b..cb9eb6344a0 100644 --- a/bundles/org.openhab.core/src/test/java/org/openhab/core/types/StateDescriptionFragmentBuilderTest.java +++ b/bundles/org.openhab.core/src/test/java/org/openhab/core/types/StateDescriptionFragmentBuilderTest.java @@ -81,7 +81,6 @@ public void builderWithOptions() { assertThat(builder.withOptions(options).build().getOptions(), is(options)); } - @SuppressWarnings("deprecation") @Test public void builderWithStateDescription() { StateDescription source = new StateDescription(BigDecimal.ZERO, BigDecimal.TEN, BigDecimal.ONE, "pattern", true, diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/openhab/core/thing/internal/CommunicationManagerOSGiTest.java b/itests/org.openhab.core.thing.tests/src/main/java/org/openhab/core/thing/internal/CommunicationManagerOSGiTest.java index 628dafbe7cb..8219b754b36 100644 --- a/itests/org.openhab.core.thing.tests/src/main/java/org/openhab/core/thing/internal/CommunicationManagerOSGiTest.java +++ b/itests/org.openhab.core.thing.tests/src/main/java/org/openhab/core/thing/internal/CommunicationManagerOSGiTest.java @@ -79,7 +79,6 @@ import org.openhab.core.thing.profiles.TriggerProfile; import org.openhab.core.thing.type.ChannelKind; import org.openhab.core.thing.type.ChannelType; -import org.openhab.core.thing.type.ChannelTypeRegistry; import org.openhab.core.thing.type.ChannelTypeUID; import org.openhab.core.types.Command; import org.openhab.core.types.State; @@ -148,7 +147,6 @@ protected void addProvider(Provider provider) { ChannelBuilder.create(TRIGGER_CHANNEL_UID_2).withKind(ChannelKind.TRIGGER).build()).build(); private @Mock @NonNullByDefault({}) AutoUpdateManager autoUpdateManagerMock; - private @Mock @NonNullByDefault({}) ChannelTypeRegistry channelTypeRegistryMock; private @Mock @NonNullByDefault({}) EventPublisher eventPublisherMock; private @Mock @NonNullByDefault({}) ItemRegistry itemRegistryMock; private @Mock @NonNullByDefault({}) ItemStateConverter itemStateConverterMock; @@ -177,9 +175,8 @@ public void beforeEach() { assertNotNull(profileFactory); - manager = new CommunicationManager(autoUpdateManagerMock, channelTypeRegistryMock, profileFactory, iclRegistry, - itemRegistryMock, itemStateConverterMock, eventPublisherMock, safeCaller, thingRegistryMock, - UNIT_PROVIDER_MOCK); + manager = new CommunicationManager(autoUpdateManagerMock, profileFactory, iclRegistry, itemRegistryMock, + itemStateConverterMock, eventPublisherMock, safeCaller, thingRegistryMock); doAnswer(invocation -> { switch (((Channel) invocation.getArguments()[0]).getKind()) { @@ -232,8 +229,6 @@ public Collection getAll() { ChannelType channelType4 = mock(ChannelType.class); when(channelType4.getItemType()).thenReturn("Number:Temperature"); - when(channelTypeRegistryMock.getChannelType(CHANNEL_TYPE_UID_4)).thenReturn(channelType4); - THING.setHandler(thingHandlerMock); when(thingRegistryMock.get(eq(THING_UID))).thenReturn(THING); From e1d2b88398b4d39cc293c40458a307d5e9684640 Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Wed, 30 Aug 2023 22:51:25 +0200 Subject: [PATCH 21/22] Update directory-watcher to 0.18.0 (#3790) Updates the directory-watcher from 0.17.1 to 0.18.0. This version has some bug fixes/improvements, see: https://github.com/gmethvin/directory-watcher/compare/v0.17.1...v0.18.0 Signed-off-by: Wouter Born --- bom/compile/pom.xml | 2 +- bom/runtime/pom.xml | 2 +- features/karaf/openhab-core/src/main/feature/feature.xml | 2 +- itests/org.openhab.core.addon.tests/itest.bndrun | 4 ++-- itests/org.openhab.core.auth.oauth2client.tests/itest.bndrun | 4 ++-- .../itest.bndrun | 4 ++-- .../itest.bndrun | 4 ++-- .../itest.bndrun | 4 ++-- .../itest.bndrun | 4 ++-- itests/org.openhab.core.automation.tests/itest.bndrun | 4 ++-- itests/org.openhab.core.config.core.tests/itest.bndrun | 4 ++-- .../itest.bndrun | 4 ++-- itests/org.openhab.core.config.discovery.tests/itest.bndrun | 4 ++-- .../itest.bndrun | 4 ++-- .../itest.bndrun | 4 ++-- itests/org.openhab.core.config.dispatch.tests/itest.bndrun | 4 ++-- itests/org.openhab.core.ephemeris.tests/itest.bndrun | 4 ++-- itests/org.openhab.core.io.net.tests/itest.bndrun | 4 ++-- itests/org.openhab.core.io.rest.core.tests/itest.bndrun | 4 ++-- itests/org.openhab.core.model.item.tests/itest.bndrun | 4 ++-- itests/org.openhab.core.model.rule.tests/itest.bndrun | 4 ++-- itests/org.openhab.core.model.script.tests/itest.bndrun | 5 +++-- itests/org.openhab.core.model.thing.tests/itest.bndrun | 5 +++-- itests/org.openhab.core.storage.json.tests/itest.bndrun | 4 ++-- itests/org.openhab.core.tests/itest.bndrun | 4 ++-- itests/org.openhab.core.thing.tests/itest.bndrun | 4 ++-- itests/org.openhab.core.voice.tests/itest.bndrun | 4 ++-- 27 files changed, 53 insertions(+), 51 deletions(-) diff --git a/bom/compile/pom.xml b/bom/compile/pom.xml index 3cef1119431..bf3272bf0c7 100644 --- a/bom/compile/pom.xml +++ b/bom/compile/pom.xml @@ -422,7 +422,7 @@ org.openhab.osgiify io.methvin.directory-watcher - 0.17.1 + 0.18.0 compile diff --git a/bom/runtime/pom.xml b/bom/runtime/pom.xml index 8235f5c492e..f666399e887 100644 --- a/bom/runtime/pom.xml +++ b/bom/runtime/pom.xml @@ -1076,7 +1076,7 @@ org.openhab.osgiify io.methvin.directory-watcher - 0.17.1 + 0.18.0 compile diff --git a/features/karaf/openhab-core/src/main/feature/feature.xml b/features/karaf/openhab-core/src/main/feature/feature.xml index c64f864734c..db4323d1c1b 100644 --- a/features/karaf/openhab-core/src/main/feature/feature.xml +++ b/features/karaf/openhab-core/src/main/feature/feature.xml @@ -46,7 +46,7 @@ mvn:org.openhab.core.bundles/org.openhab.core.config.discovery/${project.version} mvn:org.openhab.core.bundles/org.openhab.core.config.dispatch/${project.version} mvn:org.openhab.core.bundles/org.openhab.core/${project.version} - mvn:org.openhab.osgiify/io.methvin.directory-watcher/0.17.1 + mvn:org.openhab.osgiify/io.methvin.directory-watcher/0.18.0 mvn:net.java.dev.jna/jna/5.12.1 mvn:net.java.dev.jna/jna-platform/5.12.1 openhab-core-storage-json diff --git a/itests/org.openhab.core.addon.tests/itest.bndrun b/itests/org.openhab.core.addon.tests/itest.bndrun index 98e21bbbafc..45665c6365d 100644 --- a/itests/org.openhab.core.addon.tests/itest.bndrun +++ b/itests/org.openhab.core.addon.tests/itest.bndrun @@ -32,7 +32,6 @@ Fragment-Host: org.openhab.core.addon ch.qos.logback.core;version='[1.2.11,1.2.12)',\ biz.aQute.tester.junit-platform;version='[6.4.0,6.4.1)',\ com.google.gson;version='[2.9.1,2.9.2)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ @@ -61,4 +60,5 @@ Fragment-Host: org.openhab.core.addon javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' diff --git a/itests/org.openhab.core.auth.oauth2client.tests/itest.bndrun b/itests/org.openhab.core.auth.oauth2client.tests/itest.bndrun index 9c53b6c796c..509ec356590 100644 --- a/itests/org.openhab.core.auth.oauth2client.tests/itest.bndrun +++ b/itests/org.openhab.core.auth.oauth2client.tests/itest.bndrun @@ -28,7 +28,6 @@ Fragment-Host: org.openhab.core.auth.oauth2client ch.qos.logback.core;version='[1.2.11,1.2.12)',\ biz.aQute.tester.junit-platform;version='[6.4.0,6.4.1)',\ com.google.gson;version='[2.9.1,2.9.2)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ @@ -69,4 +68,5 @@ Fragment-Host: org.openhab.core.auth.oauth2client javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' diff --git a/itests/org.openhab.core.automation.integration.tests/itest.bndrun b/itests/org.openhab.core.automation.integration.tests/itest.bndrun index 14a5d1cbcdb..842201341fd 100644 --- a/itests/org.openhab.core.automation.integration.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.integration.tests/itest.bndrun @@ -30,7 +30,6 @@ Fragment-Host: org.openhab.core.automation ch.qos.logback.core;version='[1.2.11,1.2.12)',\ biz.aQute.tester.junit-platform;version='[6.4.0,6.4.1)',\ com.google.gson;version='[2.9.1,2.9.2)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ @@ -67,4 +66,5 @@ Fragment-Host: org.openhab.core.automation javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' diff --git a/itests/org.openhab.core.automation.module.core.tests/itest.bndrun b/itests/org.openhab.core.automation.module.core.tests/itest.bndrun index 34aed5a04d1..ce3c205dde4 100644 --- a/itests/org.openhab.core.automation.module.core.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.module.core.tests/itest.bndrun @@ -30,7 +30,6 @@ Fragment-Host: org.openhab.core.automation ch.qos.logback.core;version='[1.2.11,1.2.12)',\ biz.aQute.tester.junit-platform;version='[6.4.0,6.4.1)',\ com.google.gson;version='[2.9.1,2.9.2)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ @@ -67,4 +66,5 @@ Fragment-Host: org.openhab.core.automation javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' diff --git a/itests/org.openhab.core.automation.module.script.tests/itest.bndrun b/itests/org.openhab.core.automation.module.script.tests/itest.bndrun index b099138fb2b..261af8ee66e 100644 --- a/itests/org.openhab.core.automation.module.script.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.module.script.tests/itest.bndrun @@ -30,7 +30,6 @@ Fragment-Host: org.openhab.core.automation.module.script ch.qos.logback.core;version='[1.2.11,1.2.12)',\ biz.aQute.tester.junit-platform;version='[6.4.0,6.4.1)',\ com.google.gson;version='[2.9.1,2.9.2)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ @@ -64,4 +63,5 @@ Fragment-Host: org.openhab.core.automation.module.script javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' diff --git a/itests/org.openhab.core.automation.module.timer.tests/itest.bndrun b/itests/org.openhab.core.automation.module.timer.tests/itest.bndrun index c751cac6aa0..428caececf4 100644 --- a/itests/org.openhab.core.automation.module.timer.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.module.timer.tests/itest.bndrun @@ -30,7 +30,6 @@ Fragment-Host: org.openhab.core.automation ch.qos.logback.core;version='[1.2.11,1.2.12)',\ biz.aQute.tester.junit-platform;version='[6.4.0,6.4.1)',\ com.google.gson;version='[2.9.1,2.9.2)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ @@ -67,4 +66,5 @@ Fragment-Host: org.openhab.core.automation javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' diff --git a/itests/org.openhab.core.automation.tests/itest.bndrun b/itests/org.openhab.core.automation.tests/itest.bndrun index ce27e95c46b..1215cf2eccb 100644 --- a/itests/org.openhab.core.automation.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.tests/itest.bndrun @@ -30,7 +30,6 @@ Fragment-Host: org.openhab.core.automation ch.qos.logback.core;version='[1.2.11,1.2.12)',\ biz.aQute.tester.junit-platform;version='[6.4.0,6.4.1)',\ com.google.gson;version='[2.9.1,2.9.2)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ @@ -67,4 +66,5 @@ Fragment-Host: org.openhab.core.automation javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' diff --git a/itests/org.openhab.core.config.core.tests/itest.bndrun b/itests/org.openhab.core.config.core.tests/itest.bndrun index 886bd951726..33513cc4ead 100644 --- a/itests/org.openhab.core.config.core.tests/itest.bndrun +++ b/itests/org.openhab.core.config.core.tests/itest.bndrun @@ -29,7 +29,6 @@ Fragment-Host: org.openhab.core.config.core ch.qos.logback.core;version='[1.2.11,1.2.12)',\ biz.aQute.tester.junit-platform;version='[6.4.0,6.4.1)',\ com.google.gson;version='[2.9.1,2.9.2)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ @@ -62,4 +61,5 @@ Fragment-Host: org.openhab.core.config.core javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' diff --git a/itests/org.openhab.core.config.discovery.mdns.tests/itest.bndrun b/itests/org.openhab.core.config.discovery.mdns.tests/itest.bndrun index 6054da8b8b7..ba9440afbbd 100644 --- a/itests/org.openhab.core.config.discovery.mdns.tests/itest.bndrun +++ b/itests/org.openhab.core.config.discovery.mdns.tests/itest.bndrun @@ -29,7 +29,6 @@ Fragment-Host: org.openhab.core.config.discovery.mdns javax.jmdns;version='[3.5.8,3.5.9)',\ biz.aQute.tester.junit-platform;version='[6.4.0,6.4.1)',\ com.google.gson;version='[2.9.1,2.9.2)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ @@ -67,4 +66,5 @@ Fragment-Host: org.openhab.core.config.discovery.mdns javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' diff --git a/itests/org.openhab.core.config.discovery.tests/itest.bndrun b/itests/org.openhab.core.config.discovery.tests/itest.bndrun index 6dfa200e9dd..d25a754a0d9 100644 --- a/itests/org.openhab.core.config.discovery.tests/itest.bndrun +++ b/itests/org.openhab.core.config.discovery.tests/itest.bndrun @@ -29,7 +29,6 @@ Fragment-Host: org.openhab.core.config.discovery ch.qos.logback.core;version='[1.2.11,1.2.12)',\ biz.aQute.tester.junit-platform;version='[6.4.0,6.4.1)',\ com.google.gson;version='[2.9.1,2.9.2)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ @@ -66,4 +65,5 @@ Fragment-Host: org.openhab.core.config.discovery javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' diff --git a/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/itest.bndrun b/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/itest.bndrun index 280e765e7f6..a2eb4d598b2 100644 --- a/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/itest.bndrun +++ b/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/itest.bndrun @@ -28,7 +28,6 @@ Fragment-Host: org.openhab.core.config.discovery.usbserial.linuxsysfs ch.qos.logback.core;version='[1.2.11,1.2.12)',\ biz.aQute.tester.junit-platform;version='[6.4.0,6.4.1)',\ com.google.gson;version='[2.9.1,2.9.2)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ @@ -67,4 +66,5 @@ Fragment-Host: org.openhab.core.config.discovery.usbserial.linuxsysfs javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' diff --git a/itests/org.openhab.core.config.discovery.usbserial.tests/itest.bndrun b/itests/org.openhab.core.config.discovery.usbserial.tests/itest.bndrun index a18c03aef95..3d7e861065d 100644 --- a/itests/org.openhab.core.config.discovery.usbserial.tests/itest.bndrun +++ b/itests/org.openhab.core.config.discovery.usbserial.tests/itest.bndrun @@ -38,7 +38,6 @@ Provide-Capability: \ ch.qos.logback.core;version='[1.2.11,1.2.12)',\ biz.aQute.tester.junit-platform;version='[6.4.0,6.4.1)',\ com.google.gson;version='[2.9.1,2.9.2)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ @@ -75,4 +74,5 @@ Provide-Capability: \ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' diff --git a/itests/org.openhab.core.config.dispatch.tests/itest.bndrun b/itests/org.openhab.core.config.dispatch.tests/itest.bndrun index d3dde388735..09eb0be8f3d 100644 --- a/itests/org.openhab.core.config.dispatch.tests/itest.bndrun +++ b/itests/org.openhab.core.config.dispatch.tests/itest.bndrun @@ -28,7 +28,6 @@ Fragment-Host: org.openhab.core.config.dispatch ch.qos.logback.core;version='[1.2.11,1.2.12)',\ biz.aQute.tester.junit-platform;version='[6.4.0,6.4.1)',\ com.google.gson;version='[2.9.1,2.9.2)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ @@ -55,4 +54,5 @@ Fragment-Host: org.openhab.core.config.dispatch javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' diff --git a/itests/org.openhab.core.ephemeris.tests/itest.bndrun b/itests/org.openhab.core.ephemeris.tests/itest.bndrun index 97fb5ce8bca..d8bd4c1bec0 100644 --- a/itests/org.openhab.core.ephemeris.tests/itest.bndrun +++ b/itests/org.openhab.core.ephemeris.tests/itest.bndrun @@ -35,7 +35,6 @@ feature.openhab-config: \ ch.qos.logback.core;version='[1.2.11,1.2.12)',\ biz.aQute.tester.junit-platform;version='[6.4.0,6.4.1)',\ com.google.gson;version='[2.9.1,2.9.2)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ @@ -64,4 +63,5 @@ feature.openhab-config: \ javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' diff --git a/itests/org.openhab.core.io.net.tests/itest.bndrun b/itests/org.openhab.core.io.net.tests/itest.bndrun index f3fbeb0333b..8485cb15bf5 100644 --- a/itests/org.openhab.core.io.net.tests/itest.bndrun +++ b/itests/org.openhab.core.io.net.tests/itest.bndrun @@ -16,7 +16,6 @@ Fragment-Host: org.openhab.core.io.net com.google.gson;version='[2.9.1,2.9.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ com.sun.xml.bind.jaxb-osgi;version='[2.3.3,2.3.4)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ jakarta.xml.bind-api;version='[2.3.3,2.3.4)',\ junit-jupiter-api;version='[5.9.2,5.9.3)',\ @@ -73,4 +72,5 @@ Fragment-Host: org.openhab.core.io.net javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' diff --git a/itests/org.openhab.core.io.rest.core.tests/itest.bndrun b/itests/org.openhab.core.io.rest.core.tests/itest.bndrun index 3cc69a22d9d..2671c447356 100644 --- a/itests/org.openhab.core.io.rest.core.tests/itest.bndrun +++ b/itests/org.openhab.core.io.rest.core.tests/itest.bndrun @@ -38,7 +38,6 @@ Fragment-Host: org.openhab.core.io.rest.core biz.aQute.tester.junit-platform;version='[6.4.0,6.4.1)',\ com.google.gson;version='[2.9.1,2.9.2)',\ org.objectweb.asm;version='[9.4.0,9.4.1)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ @@ -104,4 +103,5 @@ Fragment-Host: org.openhab.core.io.rest.core org.apache.ws.xmlschema.core;version='[2.3.0,2.3.1)',\ json-path;version='[2.8.0,2.8.1)',\ net.minidev.accessors-smart;version='[2.4.9,2.4.10)',\ - net.minidev.json-smart;version='[2.4.10,2.4.11)' + net.minidev.json-smart;version='[2.4.10,2.4.11)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' diff --git a/itests/org.openhab.core.model.item.tests/itest.bndrun b/itests/org.openhab.core.model.item.tests/itest.bndrun index 79c840168eb..8b5ee77cb83 100644 --- a/itests/org.openhab.core.model.item.tests/itest.bndrun +++ b/itests/org.openhab.core.model.item.tests/itest.bndrun @@ -50,7 +50,6 @@ Fragment-Host: org.openhab.core.model.item org.eclipse.xtext.xbase;version='[2.29.0,2.29.1)',\ org.eclipse.xtext.xbase.lib;version='[2.29.0,2.29.1)',\ org.objectweb.asm;version='[9.4.0,9.4.1)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.scr;version='[2.2.4,2.2.5)',\ @@ -114,4 +113,5 @@ Fragment-Host: org.openhab.core.model.item org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ uom-lib-common;version='[2.2.0,2.2.1)',\ - org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)' + org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' diff --git a/itests/org.openhab.core.model.rule.tests/itest.bndrun b/itests/org.openhab.core.model.rule.tests/itest.bndrun index 410c1aea6aa..1ded91e0de5 100644 --- a/itests/org.openhab.core.model.rule.tests/itest.bndrun +++ b/itests/org.openhab.core.model.rule.tests/itest.bndrun @@ -54,7 +54,6 @@ Fragment-Host: org.openhab.core.model.rule.runtime org.eclipse.xtext.xbase;version='[2.29.0,2.29.1)',\ org.eclipse.xtext.xbase.lib;version='[2.29.0,2.29.1)',\ org.objectweb.asm;version='[9.4.0,9.4.1)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ @@ -118,4 +117,5 @@ Fragment-Host: org.openhab.core.model.rule.runtime javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' diff --git a/itests/org.openhab.core.model.script.tests/itest.bndrun b/itests/org.openhab.core.model.script.tests/itest.bndrun index 7724a4344da..b3f68a8e50d 100644 --- a/itests/org.openhab.core.model.script.tests/itest.bndrun +++ b/itests/org.openhab.core.model.script.tests/itest.bndrun @@ -53,7 +53,6 @@ Fragment-Host: org.openhab.core.model.script org.eclipse.xtext.xbase;version='[2.29.0,2.29.1)',\ org.eclipse.xtext.xbase.lib;version='[2.29.0,2.29.1)',\ org.objectweb.asm;version='[9.4.0,9.4.1)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ @@ -121,4 +120,6 @@ Fragment-Host: org.openhab.core.model.script javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)',\ + org.openhab.core.model.rule.runtime;version='[4.1.0,4.1.1)' diff --git a/itests/org.openhab.core.model.thing.tests/itest.bndrun b/itests/org.openhab.core.model.thing.tests/itest.bndrun index 07eea033337..b5df5c10058 100644 --- a/itests/org.openhab.core.model.thing.tests/itest.bndrun +++ b/itests/org.openhab.core.model.thing.tests/itest.bndrun @@ -51,7 +51,6 @@ Fragment-Host: org.openhab.core.model.thing org.eclipse.xtext.xbase;version='[2.29.0,2.29.1)',\ org.eclipse.xtext.xbase.lib;version='[2.29.0,2.29.1)',\ org.objectweb.asm;version='[9.4.0,9.4.1)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.scr;version='[2.2.4,2.2.5)',\ @@ -123,4 +122,6 @@ Fragment-Host: org.openhab.core.model.thing org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ uom-lib-common;version='[2.2.0,2.2.1)',\ - org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)' + org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)',\ + org.openhab.core.model.rule.runtime;version='[4.1.0,4.1.1)' diff --git a/itests/org.openhab.core.storage.json.tests/itest.bndrun b/itests/org.openhab.core.storage.json.tests/itest.bndrun index cce09022d8f..a28cd2a895c 100644 --- a/itests/org.openhab.core.storage.json.tests/itest.bndrun +++ b/itests/org.openhab.core.storage.json.tests/itest.bndrun @@ -28,7 +28,6 @@ Fragment-Host: org.openhab.core.storage.json ch.qos.logback.core;version='[1.2.11,1.2.12)',\ biz.aQute.tester.junit-platform;version='[6.4.0,6.4.1)',\ com.google.gson;version='[2.9.1,2.9.2)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ @@ -60,4 +59,5 @@ Fragment-Host: org.openhab.core.storage.json javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' diff --git a/itests/org.openhab.core.tests/itest.bndrun b/itests/org.openhab.core.tests/itest.bndrun index 56e0a405184..f7b6ad99c2c 100644 --- a/itests/org.openhab.core.tests/itest.bndrun +++ b/itests/org.openhab.core.tests/itest.bndrun @@ -28,7 +28,6 @@ Fragment-Host: org.openhab.core ch.qos.logback.core;version='[1.2.11,1.2.12)',\ biz.aQute.tester.junit-platform;version='[6.4.0,6.4.1)',\ com.google.gson;version='[2.9.1,2.9.2)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ @@ -59,4 +58,5 @@ Fragment-Host: org.openhab.core javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' diff --git a/itests/org.openhab.core.thing.tests/itest.bndrun b/itests/org.openhab.core.thing.tests/itest.bndrun index c975de3219b..f20253fa907 100644 --- a/itests/org.openhab.core.thing.tests/itest.bndrun +++ b/itests/org.openhab.core.thing.tests/itest.bndrun @@ -32,7 +32,6 @@ Fragment-Host: org.openhab.core.thing ch.qos.logback.core;version='[1.2.11,1.2.12)',\ biz.aQute.tester.junit-platform;version='[6.4.0,6.4.1)',\ com.google.gson;version='[2.9.1,2.9.2)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ @@ -68,4 +67,5 @@ Fragment-Host: org.openhab.core.thing javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' diff --git a/itests/org.openhab.core.voice.tests/itest.bndrun b/itests/org.openhab.core.voice.tests/itest.bndrun index a8fba8b37c2..f8f7ecb0639 100644 --- a/itests/org.openhab.core.voice.tests/itest.bndrun +++ b/itests/org.openhab.core.voice.tests/itest.bndrun @@ -32,7 +32,6 @@ Fragment-Host: org.openhab.core.voice ch.qos.logback.core;version='[1.2.11,1.2.12)',\ biz.aQute.tester.junit-platform;version='[6.4.0,6.4.1)',\ com.google.gson;version='[2.9.1,2.9.2)',\ - io.methvin.directory-watcher;version='[0.17.1,0.17.2)',\ com.sun.jna;version='[5.12.1,5.12.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ @@ -73,4 +72,5 @@ Fragment-Host: org.openhab.core.voice javax.measure.unit-api;version='[2.2.0,2.2.1)',\ org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ - uom-lib-common;version='[2.2.0,2.2.1)' + uom-lib-common;version='[2.2.0,2.2.1)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' From 1c8096b4eb9bedfbcea35430d24f171ce7fa3559 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Sat, 2 Sep 2023 19:14:59 +0200 Subject: [PATCH 22/22] [DSL] Expose ColorUtil methods to DSL rules (#3749) Fix #3743 Signed-off-by: Laurent Garnier --- bundles/org.openhab.core.model.script/bnd.bnd | 1 + .../core/model/script/actions/CoreUtil.java | 65 +++++++++++++++++++ .../ScriptImplicitlyImportedTypes.java | 2 + 3 files changed, 68 insertions(+) create mode 100644 bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/actions/CoreUtil.java diff --git a/bundles/org.openhab.core.model.script/bnd.bnd b/bundles/org.openhab.core.model.script/bnd.bnd index 33108563fe1..dad83d472e7 100644 --- a/bundles/org.openhab.core.model.script/bnd.bnd +++ b/bundles/org.openhab.core.model.script/bnd.bnd @@ -39,6 +39,7 @@ Import-Package: \ org.openhab.core.transform,\ org.openhab.core.transform.actions,\ org.openhab.core.types,\ + org.openhab.core.util,\ org.openhab.core.voice,\ org.openhab.core.voice.text,\ org.openhab.core.io.console,\ diff --git a/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/actions/CoreUtil.java b/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/actions/CoreUtil.java new file mode 100644 index 00000000000..5b35a55387c --- /dev/null +++ b/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/actions/CoreUtil.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2010-2023 Contributors to the openHAB project + * + * See the NOTICE file(s) distributed with this work for additional + * information. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + */ +package org.openhab.core.model.script.actions; + +import org.openhab.core.library.types.HSBType; +import org.openhab.core.library.types.PercentType; +import org.openhab.core.util.ColorUtil; +import org.openhab.core.util.ColorUtil.Gamut; + +/** + * This class provides static methods mapping methods from package org.openhab.core.util + * + * @author Laurent Garnier - Initial contribution + */ +public class CoreUtil { + + public static int[] hsbToRgb(HSBType hsb) { + return ColorUtil.hsbToRgb(hsb); + } + + public static PercentType[] hsbToRgbPercent(HSBType hsb) { + return ColorUtil.hsbToRgbPercent(hsb); + } + + public static int hsbTosRgb(HSBType hsb) { + return ColorUtil.hsbTosRgb(hsb); + } + + public static double[] hsbToXY(HSBType hsb) { + return ColorUtil.hsbToXY(hsb); + } + + public static double[] hsbToXY(HSBType hsb, double[] gamutR, double[] gamutG, double[] gamutB) { + Gamut gamut = new Gamut(gamutR, gamutG, gamutB); + return ColorUtil.hsbToXY(hsb, gamut); + } + + public static HSBType rgbToHsb(int[] rgb) throws IllegalArgumentException { + return ColorUtil.rgbToHsb(rgb); + } + + public static HSBType rgbToHsb(PercentType[] rgb) throws IllegalArgumentException { + return ColorUtil.rgbToHsb(rgb); + } + + public static HSBType xyToHsb(double[] xy) throws IllegalArgumentException { + return ColorUtil.xyToHsb(xy); + } + + public static HSBType xyToHsb(double[] xy, double[] gamutR, double[] gamutG, double[] gamutB) + throws IllegalArgumentException { + Gamut gamut = new Gamut(gamutR, gamutG, gamutB); + return ColorUtil.xyToHsb(xy, gamut); + } +} diff --git a/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/scoping/ScriptImplicitlyImportedTypes.java b/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/scoping/ScriptImplicitlyImportedTypes.java index 679139df804..b16396532a3 100644 --- a/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/scoping/ScriptImplicitlyImportedTypes.java +++ b/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/scoping/ScriptImplicitlyImportedTypes.java @@ -31,6 +31,7 @@ import org.openhab.core.library.unit.SIUnits; import org.openhab.core.library.unit.Units; import org.openhab.core.model.script.actions.BusEvent; +import org.openhab.core.model.script.actions.CoreUtil; import org.openhab.core.model.script.actions.Exec; import org.openhab.core.model.script.actions.HTTP; import org.openhab.core.model.script.actions.Log; @@ -100,6 +101,7 @@ protected List> getStaticImportClasses() { result.add(Transformation.class); result.add(ScriptExecution.class); result.add(URLEncoder.class); + result.add(CoreUtil.class); result.add(ImperialUnits.class); result.add(MetricPrefix.class);