Skip to content

Commit

Permalink
Move to JUPnP v3.0.1 (#4165)
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Garnier <[email protected]>
  • Loading branch information
lolodomo authored Apr 2, 2024
1 parent 9f5a60d commit dcfadae
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bom/compile/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
<dependency>
<groupId>org.jupnp</groupId>
<artifactId>org.jupnp</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
<scope>compile</scope>
</dependency>

Expand Down
2 changes: 1 addition & 1 deletion bom/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@
<dependency>
<groupId>org.jupnp</groupId>
<artifactId>org.jupnp</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
<scope>compile</scope>
</dependency>

Expand Down
2 changes: 1 addition & 1 deletion bundles/org.openhab.core.config.jupnp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<dependency>
<groupId>org.jupnp</groupId>
<artifactId>org.jupnp</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
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.
Expand All @@ -33,6 +35,12 @@
*/
@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<>());
Expand Down
4 changes: 2 additions & 2 deletions features/karaf/openhab-tp/src/main/feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,14 @@
</feature>

<feature name="openhab.tp-jupnp" description="UPnP/DLNA library for Java" version="${project.version}">
<capability>openhab.tp;feature=jupnp;version=3.0.0</capability>
<capability>openhab.tp;feature=jupnp;version=3.0.1</capability>
<feature dependency="true">http</feature>
<feature dependency="true">scr</feature>
<feature dependency="true">openhab.tp-httpclient</feature>
<!-- Use the Java 11 LinkedTransferQueue as workaround for JDK-8301341 -->
<bundle>mvn:org.openhab/base-fixes/1.0.0</bundle>
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.config.jupnp/${project.version}</bundle>
<bundle>mvn:org.jupnp/org.jupnp/3.0.0</bundle>
<bundle>mvn:org.jupnp/org.jupnp/3.0.1</bundle>
</feature>

<feature name="openhab.tp-lsp4j" description="Eclipse LSP4J" version="${project.version}">
Expand Down

0 comments on commit dcfadae

Please sign in to comment.