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/bom/compile/pom.xml b/bom/compile/pom.xml
index a5940ac6ecf..bf3272bf0c7 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
@@ -202,7 +202,8 @@
org.jupnp
org.jupnp
- 2.7.1
+
+ 2.7.1.OH1
compile
@@ -212,7 +213,7 @@
javax.measure
unit-api
- 2.1.3
+ 2.2
compile
@@ -224,7 +225,7 @@
tech.units
indriya
- 2.1.2
+ 2.2
compile
@@ -421,7 +422,7 @@
org.openhab.osgiify
io.methvin.directory-watcher
- 0.17.1
+ 0.18.0
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..f666399e887 100644
--- a/bom/runtime/pom.xml
+++ b/bom/runtime/pom.xml
@@ -17,12 +17,12 @@
2.7.4
- 3.4.5
- 2.14.1
+ 3.6.1
+ 2.15.2
9.4.50.v20221201
2.2.0
8.0.15
- 2.1.9
+ 2.2.15
@@ -469,7 +469,8 @@
org.jupnp
org.jupnp
- 2.7.1
+
+ 2.7.1.OH1
compile
@@ -489,7 +490,7 @@
javax.measure
unit-api
- 2.1.2
+ 2.2
compile
@@ -508,7 +509,7 @@
tech.units
indriya
- 2.1.2
+ 2.2
compile
@@ -1067,7 +1068,7 @@
org.javassist
javassist
- 3.27.0-GA
+ 3.29.2-GA
compile
@@ -1075,7 +1076,7 @@
org.openhab.osgiify
io.methvin.directory-watcher
- 0.17.1
+ 0.18.0
compile
@@ -1090,6 +1091,14 @@
5.12.1
compile
+
+
+
+ org.openhab
+ base-fixes
+ 1.0.0
+ compile
+
diff --git a/bom/test/pom.xml b/bom/test/pom.xml
index 48b6f5be1db..5c8aae9071a 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
@@ -65,7 +65,7 @@
com.jayway.jsonpath
json-path
- 2.4.0
+ 2.8.0
org.apache.aries.jax.rs
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 :
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.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.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