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> 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.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()) { 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 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.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(); 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.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.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); 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)) { 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.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 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.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.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 16175b8d514..8b313051b6a 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 @@ -90,11 +90,11 @@ 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 static final Pattern ICON_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; 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); 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/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/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/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/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/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/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/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/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/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/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/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/features/karaf/openhab-core/src/main/feature/feature.xml b/features/karaf/openhab-core/src/main/feature/feature.xml index 615a415ab7b..db4323d1c1b 100644 --- a/features/karaf/openhab-core/src/main/feature/feature.xml +++ b/features/karaf/openhab-core/src/main/feature/feature.xml @@ -40,12 +40,13 @@ 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} 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/features/karaf/openhab-tp/src/main/feature/feature.xml b/features/karaf/openhab-tp/src/main/feature/feature.xml index ddbea330283..0c2401c795e 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 @@ -88,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 @@ -132,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 @@ -212,7 +213,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 @@ -285,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 diff --git a/itests/org.openhab.core.addon.tests/itest.bndrun b/itests/org.openhab.core.addon.tests/itest.bndrun index 6bed7a950eb..45665c6365d 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)',\ @@ -36,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)',\ @@ -60,4 +55,10 @@ 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)',\ + 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)',\ + 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 4a4ce243c5d..509ec356590 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)',\ @@ -32,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)',\ @@ -68,4 +63,10 @@ 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)',\ + 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)',\ + 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 7e0167eb827..842201341fd 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)',\ @@ -34,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)',\ @@ -66,4 +61,10 @@ 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)',\ + 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)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' 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())); 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..ce3c205dde4 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)',\ @@ -34,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)',\ @@ -66,4 +61,10 @@ 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)',\ + 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)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' 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.script.tests/itest.bndrun b/itests/org.openhab.core.automation.module.script.tests/itest.bndrun index a37ae6570a9..261af8ee66e 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)',\ @@ -34,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)',\ @@ -63,4 +58,10 @@ 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)',\ + 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)',\ + 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 002c12fc7be..428caececf4 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)',\ @@ -34,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)',\ @@ -66,4 +61,10 @@ 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)',\ + 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)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' 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/itest.bndrun b/itests/org.openhab.core.automation.tests/itest.bndrun index dd9c25b98a1..1215cf2eccb 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)',\ @@ -34,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)',\ @@ -66,4 +61,10 @@ 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)',\ + 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)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' 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.config.core.tests/itest.bndrun b/itests/org.openhab.core.config.core.tests/itest.bndrun index 6b546af613e..33513cc4ead 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)',\ @@ -33,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)',\ @@ -61,4 +56,10 @@ 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)',\ + 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)',\ + 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 9c56f25b3c3..ba9440afbbd 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)',\ @@ -33,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)',\ @@ -66,4 +61,10 @@ 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)',\ + 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)',\ + 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 2c9765d125e..d25a754a0d9 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)',\ @@ -33,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)',\ @@ -65,4 +60,10 @@ 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)',\ + 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)',\ + 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 272f51848c9..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 @@ -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)',\ @@ -32,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)',\ @@ -66,4 +61,10 @@ 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)',\ + 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)',\ + 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 a0f6bff136f..3d7e861065d 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)',\ @@ -42,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)',\ @@ -74,4 +69,10 @@ 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)',\ + 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)',\ + 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 041c09e5e18..09eb0be8f3d 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)',\ @@ -32,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)',\ @@ -54,4 +49,10 @@ 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)',\ + 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)',\ + 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 6eccdf29ad2..d8bd4c1bec0 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)',\ @@ -39,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)',\ @@ -63,4 +58,10 @@ 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)',\ + 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)',\ + 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 d091b905e59..8485cb15bf5 100644 --- a/itests/org.openhab.core.io.net.tests/itest.bndrun +++ b/itests/org.openhab.core.io.net.tests/itest.bndrun @@ -16,11 +16,8 @@ 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.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 +55,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)',\ @@ -72,4 +67,10 @@ 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)',\ + 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)',\ + 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 8d7c0e47cad..2671c447356 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)',\ @@ -28,23 +24,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.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)',\ - 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)',\ @@ -55,9 +38,7 @@ 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)',\ - 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)',\ @@ -106,4 +87,21 @@ 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)',\ + 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)',\ + 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)',\ + 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)',\ + 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 e1bf65fd265..8b5ee77cb83 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)',\ @@ -54,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)',\ @@ -82,7 +77,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)',\ @@ -104,7 +98,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 +107,11 @@ 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)',\ + 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)',\ + 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 cf58e39a8ab..1ded91e0de5 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)',\ @@ -58,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)',\ @@ -117,4 +112,10 @@ 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)',\ + 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)',\ + 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 a76292b3714..b3f68a8e50d 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)',\ @@ -57,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)',\ @@ -110,7 +105,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 +115,11 @@ 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)',\ + 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)',\ + 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 6fc4089479e..b5df5c10058 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)',\ @@ -55,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)',\ @@ -83,7 +78,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)',\ @@ -110,7 +104,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 +116,12 @@ 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)',\ + 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)',\ + 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 ecafe773e10..a28cd2a895c 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)',\ @@ -32,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)',\ @@ -59,4 +54,10 @@ 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)',\ + 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)',\ + 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 45bafe3586c..f7b6ad99c2c 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)',\ @@ -32,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)',\ @@ -58,4 +53,10 @@ 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)',\ + 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)',\ + 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 85765748f4d..f20253fa907 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)',\ @@ -36,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)',\ @@ -67,4 +62,10 @@ 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)',\ + 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)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' 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..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; @@ -104,7 +103,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 +115,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"); @@ -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; @@ -167,8 +165,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); @@ -177,9 +175,8 @@ public void beforeEach() { assertNotNull(profileFactory); - manager = new CommunicationManager(autoUpdateManagerMock, channelTypeRegistryMock, profileFactory, iclRegistry, - itemRegistryMock, itemStateConverterMock, eventPublisherMock, safeCaller, thingRegistryMock, - unitProviderMock); + manager = new CommunicationManager(autoUpdateManagerMock, profileFactory, iclRegistry, itemRegistryMock, + itemStateConverterMock, eventPublisherMock, safeCaller, thingRegistryMock); doAnswer(invocation -> { switch (((Channel) invocation.getArguments()[0]).getKind()) { @@ -227,18 +224,16 @@ 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"); - when(channelTypeRegistryMock.getChannelType(CHANNEL_TYPE_UID_4)).thenReturn(channelType4); - THING.setHandler(thingHandlerMock); when(thingRegistryMock.get(eq(THING_UID))).thenReturn(THING); - manager.addItemFactory(new CoreItemFactory(unitProviderMock)); + manager.addItemFactory(new CoreItemFactory(UNIT_PROVIDER_MOCK)); } @Test @@ -307,7 +302,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(() -> { diff --git a/itests/org.openhab.core.voice.tests/itest.bndrun b/itests/org.openhab.core.voice.tests/itest.bndrun index 334784caa5c..f8f7ecb0639 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)',\ @@ -36,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)',\ @@ -72,4 +67,10 @@ 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)',\ + 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)',\ + io.methvin.directory-watcher;version='[0.18.0,0.18.1)' 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 d92eb97a4e2..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,20 +271,20 @@ 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 - - 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 @@ -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 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())); 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