From dcfadaede6ebf3f50ce049857f028c36ddb29668 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Tue, 2 Apr 2024 18:21:57 +0200 Subject: [PATCH] Move to JUPnP v3.0.1 (#4165) Signed-off-by: Laurent Garnier --- bom/compile/pom.xml | 2 +- bom/runtime/pom.xml | 2 +- bundles/org.openhab.core.config.jupnp/pom.xml | 2 +- .../config/jupnp/internal/OHUpnpServiceConfiguration.java | 8 ++++++++ features/karaf/openhab-tp/src/main/feature/feature.xml | 4 ++-- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/bom/compile/pom.xml b/bom/compile/pom.xml index a7618188a..df9afc8f9 100644 --- a/bom/compile/pom.xml +++ b/bom/compile/pom.xml @@ -203,7 +203,7 @@ org.jupnp org.jupnp - 3.0.0 + 3.0.1 compile diff --git a/bom/runtime/pom.xml b/bom/runtime/pom.xml index 6266b67fb..a5a92e9ce 100644 --- a/bom/runtime/pom.xml +++ b/bom/runtime/pom.xml @@ -475,7 +475,7 @@ org.jupnp org.jupnp - 3.0.0 + 3.0.1 compile diff --git a/bundles/org.openhab.core.config.jupnp/pom.xml b/bundles/org.openhab.core.config.jupnp/pom.xml index 4ad3d61e6..8205180a3 100644 --- a/bundles/org.openhab.core.config.jupnp/pom.xml +++ b/bundles/org.openhab.core.config.jupnp/pom.xml @@ -18,7 +18,7 @@ org.jupnp org.jupnp - 3.0.0 + 3.0.1 diff --git a/bundles/org.openhab.core.config.jupnp/src/main/java/org/openhab/core/config/jupnp/internal/OHUpnpServiceConfiguration.java b/bundles/org.openhab.core.config.jupnp/src/main/java/org/openhab/core/config/jupnp/internal/OHUpnpServiceConfiguration.java index e5707de5a..85793c29b 100644 --- a/bundles/org.openhab.core.config.jupnp/src/main/java/org/openhab/core/config/jupnp/internal/OHUpnpServiceConfiguration.java +++ b/bundles/org.openhab.core.config.jupnp/src/main/java/org/openhab/core/config/jupnp/internal/OHUpnpServiceConfiguration.java @@ -20,6 +20,8 @@ import org.jupnp.UpnpServiceConfiguration; import org.openhab.basefixes.util.concurrent.LinkedTransferQueue; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.ConfigurationPolicy; +import org.osgi.service.component.annotations.Reference; +import org.osgi.service.http.HttpService; /** * Uses the Java 11 {@link LinkedTransferQueue} with jUPnP as workaround for the buggy OpenJDK 17 implementation. @@ -33,6 +35,12 @@ import org.osgi.service.component.annotations.ConfigurationPolicy; */ @Component(configurationPid = "org.jupnp", configurationPolicy = ConfigurationPolicy.REQUIRE, service = UpnpServiceConfiguration.class) public class OHUpnpServiceConfiguration extends OSGiUpnpServiceConfiguration { + @Reference + @Override + public void setHttpService(HttpService httpService) { + super.setHttpService(httpService); + } + @Override protected ExecutorService createMainExecutorService() { return QueueingThreadPoolExecutor.createInstance("upnp-main", threadPoolSize, new LinkedTransferQueue<>()); diff --git a/features/karaf/openhab-tp/src/main/feature/feature.xml b/features/karaf/openhab-tp/src/main/feature/feature.xml index 8f75a304a..0795abb9d 100644 --- a/features/karaf/openhab-tp/src/main/feature/feature.xml +++ b/features/karaf/openhab-tp/src/main/feature/feature.xml @@ -194,14 +194,14 @@ - openhab.tp;feature=jupnp;version=3.0.0 + openhab.tp;feature=jupnp;version=3.0.1 http scr openhab.tp-httpclient mvn:org.openhab/base-fixes/1.0.0 mvn:org.openhab.core.bundles/org.openhab.core.config.jupnp/${project.version} - mvn:org.jupnp/org.jupnp/3.0.0 + mvn:org.jupnp/org.jupnp/3.0.1