]> git.basschouten.com Git - openhab-addons.git/commitdiff
Upgrade Units of Measurement dependencies (#10583)
authorWouter Born <github@maindrain.net>
Tue, 11 May 2021 06:31:03 +0000 (08:31 +0200)
committerGitHub <noreply@github.com>
Tue, 11 May 2021 06:31:03 +0000 (08:31 +0200)
* Fix code/tests for upgrade
* Resolve runbundles
* Update Checkstyle ruleset for changed packages

Signed-off-by: Wouter Born <github@maindrain.net>
24 files changed:
bundles/org.openhab.binding.bluetooth.airthings/src/main/java/org/openhab/binding/bluetooth/airthings/internal/AirthingsBindingConstants.java
bundles/org.openhab.binding.bluetooth.generic/src/main/java/org/openhab/binding/bluetooth/generic/internal/BluetoothUnit.java
bundles/org.openhab.binding.dsmr/src/main/java/org/openhab/binding/dsmr/internal/device/cosem/CosemQuantity.java
bundles/org.openhab.binding.homematic/src/test/java/org/openhab/binding/homematic/internal/converter/ConvertFromBindingTest.java
bundles/org.openhab.binding.http/src/main/java/org/openhab/binding/http/internal/converter/NumberItemConverter.java
bundles/org.openhab.binding.http/src/test/java/org/openhab/binding/http/internal/converter/ConverterTest.java
bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoBasicHandler.java
bundles/org.openhab.binding.modbus.e3dc/src/test/java/org/openhab/binding/modbus/e3dc/dto/DataBlockTest.java
bundles/org.openhab.binding.modbus/src/main/java/org/openhab/binding/modbus/internal/profiles/ModbusGainOffsetProfile.java
bundles/org.openhab.binding.modbus/src/test/java/org/openhab/binding/modbus/internal/profiles/ModbusGainOffsetProfileTest.java
itests/itest-common.bndrun
itests/org.openhab.binding.astro.tests/itest.bndrun
itests/org.openhab.binding.avmfritz.tests/itest.bndrun
itests/org.openhab.binding.feed.tests/itest.bndrun
itests/org.openhab.binding.hue.tests/itest.bndrun
itests/org.openhab.binding.max.tests/itest.bndrun
itests/org.openhab.binding.modbus.tests/itest.bndrun
itests/org.openhab.binding.nest.tests/itest.bndrun
itests/org.openhab.binding.ntp.tests/itest.bndrun
itests/org.openhab.binding.systeminfo.tests/itest.bndrun
itests/org.openhab.binding.tradfri.tests/itest.bndrun
itests/org.openhab.binding.wemo.tests/itest.bndrun
itests/org.openhab.persistence.mapdb.tests/itest.bndrun
tools/static-code-analysis/checkstyle/ruleset.properties

index 326c7a4c7d74a918f0da05b9bbac82b45f4c79ab..de8a43c8f0ae75c7a9849e1beae87d7ef675729d 100644 (file)
@@ -25,10 +25,10 @@ import org.openhab.core.library.unit.SIUnits;
 import org.openhab.core.library.unit.Units;
 import org.openhab.core.thing.ThingTypeUID;
 
-import tec.uom.se.format.SimpleUnitFormat;
-import tec.uom.se.function.RationalConverter;
-import tec.uom.se.unit.ProductUnit;
-import tec.uom.se.unit.TransformedUnit;
+import tech.units.indriya.format.SimpleUnitFormat;
+import tech.units.indriya.function.MultiplyConverter;
+import tech.units.indriya.unit.ProductUnit;
+import tech.units.indriya.unit.TransformedUnit;
 
 /**
  * The {@link AirthingsBindingConstants} class defines common constants, which are
@@ -59,7 +59,7 @@ public class AirthingsBindingConstants {
     public static final String CHANNEL_ID_RADON_LT_AVG = "radon_lt_avg";
 
     public static final Unit<Dimensionless> PARTS_PER_BILLION = new TransformedUnit<>(Units.ONE,
-            new RationalConverter(BigInteger.ONE, BigInteger.valueOf(1000000000)));
+            MultiplyConverter.ofRational(BigInteger.ONE, BigInteger.valueOf(1000000000)));
     public static final Unit<Density> BECQUEREL_PER_CUBIC_METRE = new ProductUnit<>(
             Units.BECQUEREL.divide(SIUnits.CUBIC_METRE));
 
index f4ac1ace99b486f1589aed8703a001b67812581e..e983ca65cc68ddeea714d85ece60fe484fa099a1 100644 (file)
@@ -36,12 +36,10 @@ import org.openhab.core.library.unit.MetricPrefix;
 import org.openhab.core.library.unit.SIUnits;
 import org.openhab.core.library.unit.Units;
 
-import tec.uom.se.format.SimpleUnitFormat;
-import tec.uom.se.function.MultiplyConverter;
-import tec.uom.se.function.PiMultiplierConverter;
-import tec.uom.se.function.RationalConverter;
-import tec.uom.se.unit.ProductUnit;
-import tec.uom.se.unit.TransformedUnit;
+import tech.units.indriya.format.SimpleUnitFormat;
+import tech.units.indriya.function.MultiplyConverter;
+import tech.units.indriya.unit.ProductUnit;
+import tech.units.indriya.unit.TransformedUnit;
 
 /**
  * The {@link BluetoothUnit} maps bluetooth units to openHAB units.
@@ -239,13 +237,13 @@ public enum BluetoothUnit {
                 new ProductUnit<RadiationDoseAbsorptionRate>(Units.GRAY.divide(Units.SECOND)));
 
         public static final Unit<Mass> POUND = addUnit(
-                new TransformedUnit<Mass>(SIUnits.KILOGRAM, new MultiplyConverter(0.45359237)));
+                new TransformedUnit<Mass>(SIUnits.KILOGRAM, MultiplyConverter.of(0.45359237)));
 
         public static final Unit<Angle> MINUTE_ANGLE = addUnit(new TransformedUnit<Angle>(Units.RADIAN,
-                new PiMultiplierConverter().concatenate(new RationalConverter(1, 180 * 60))));
+                MultiplyConverter.ofPiExponent(1).concatenate(MultiplyConverter.ofRational(1, 180 * 60))));
 
         public static final Unit<Angle> SECOND_ANGLE = addUnit(new TransformedUnit<Angle>(Units.RADIAN,
-                new PiMultiplierConverter().concatenate(new RationalConverter(1, 180 * 60 * 60))));
+                MultiplyConverter.ofPiExponent(1).concatenate(MultiplyConverter.ofRational(1, 180 * 60 * 60))));
 
         public static final Unit<Area> HECTARE = addUnit(SIUnits.SQUARE_METRE.multiply(10000.0));
         public static final Unit<Area> BARN = addUnit(SIUnits.SQUARE_METRE.multiply(10E-28));
@@ -259,10 +257,10 @@ public enum BluetoothUnit {
                 new ProductUnit<Radiance>(WATT_PER_STERADIAN.divide(SIUnits.SQUARE_METRE)));
 
         public static final Unit<Frequency> CYCLES_PER_MINUTE = addUnit(new TransformedUnit<Frequency>(Units.HERTZ,
-                new RationalConverter(BigInteger.valueOf(60), BigInteger.ONE)));
+                MultiplyConverter.ofRational(BigInteger.valueOf(60), BigInteger.ONE)));
 
         public static final Unit<Angle> REVOLUTION = addUnit(new TransformedUnit<Angle>(Units.RADIAN,
-                new PiMultiplierConverter().concatenate(new RationalConverter(2, 1))));
+                MultiplyConverter.ofPiExponent(1).concatenate(MultiplyConverter.ofRational(2, 1))));
         public static final Unit<AngularVelocity> REVOLUTION_PER_MINUTE = addUnit(
                 new ProductUnit<AngularVelocity>(REVOLUTION.divide(Units.MINUTE)));
 
index c58886f29fd3ef61b05ab521b72cb5f91e26134d..89723a6beaa93938e3b96e13ccb225c3df3f2c10 100644 (file)
@@ -124,7 +124,15 @@ class CosemQuantity<Q extends @Nullable Quantity<Q>> extends CosemValueDescripto
      */
     private String prepare(String cosemValue) {
         Matcher matcher = COSEM_VALUE_WITH_UNIT_PATTERN.matcher(cosemValue.replace("m3", "m³"));
+        if (!matcher.find()) {
+            return cosemValue;
+        }
 
-        return matcher.find() ? matcher.group(1) + ' ' + matcher.group(2) : cosemValue;
+        try {
+            Integer.parseInt(matcher.group(2));
+            return cosemValue;
+        } catch (NumberFormatException e) {
+            return matcher.group(1) + ' ' + matcher.group(2);
+        }
     }
 }
index 746ba8856b524eb43a1ef1df3830a71a82a9f010..931670734486bc8366f1ad68b8a7f6cb770afc2e 100644 (file)
@@ -24,7 +24,7 @@ import org.openhab.core.library.unit.ImperialUnits;
 import org.openhab.core.library.unit.Units;
 import org.openhab.core.types.State;
 
-import tec.uom.se.quantity.QuantityDimension;
+import tech.units.indriya.unit.UnitDimension;
 
 /**
  * Tests for {@link AbstractTypeConverter#convertFromBinding(HmDatapoint)}.
@@ -75,12 +75,12 @@ public class ConvertFromBindingTest extends BaseConverterTest {
         floatQuantityDp.setUnit("°C");
         convertedState = temperatureConverter.convertFromBinding(floatQuantityDp);
         assertThat(convertedState, instanceOf(QuantityType.class));
-        assertThat(((QuantityType<?>) convertedState).getDimension(), is(QuantityDimension.TEMPERATURE));
+        assertThat(((QuantityType<?>) convertedState).getDimension(), is(UnitDimension.TEMPERATURE));
         assertThat(((QuantityType<?>) convertedState).doubleValue(), is(10.5));
         assertThat(((QuantityType<?>) convertedState).toUnit(ImperialUnits.FAHRENHEIT).doubleValue(), is(50.9));
 
         floatQuantityDp.setUnit("°C");
-        assertThat(((QuantityType<?>) convertedState).getDimension(), is(QuantityDimension.TEMPERATURE));
+        assertThat(((QuantityType<?>) convertedState).getDimension(), is(UnitDimension.TEMPERATURE));
         assertThat(((QuantityType<?>) convertedState).doubleValue(), is(10.5));
 
         integerQuantityDp.setValue(50000);
@@ -88,7 +88,7 @@ public class ConvertFromBindingTest extends BaseConverterTest {
         convertedState = frequencyConverter.convertFromBinding(integerQuantityDp);
         assertThat(convertedState, instanceOf(QuantityType.class));
         assertThat(((QuantityType<?>) convertedState).getDimension(),
-                is(QuantityDimension.NONE.divide(QuantityDimension.TIME)));
+                is(UnitDimension.NONE.divide(UnitDimension.TIME)));
         assertThat(((QuantityType<?>) convertedState).intValue(), is(50000));
         assertThat(((QuantityType<?>) convertedState).toUnit(Units.HERTZ).intValue(), is(50));
 
@@ -96,7 +96,7 @@ public class ConvertFromBindingTest extends BaseConverterTest {
         floatQuantityDp.setUnit("100%");
         convertedState = timeConverter.convertFromBinding(floatQuantityDp);
         assertThat(convertedState, instanceOf(QuantityType.class));
-        assertThat(((QuantityType<?>) convertedState).getDimension(), is(QuantityDimension.NONE));
+        assertThat(((QuantityType<?>) convertedState).getDimension(), is(UnitDimension.NONE));
         assertThat(((QuantityType<?>) convertedState).doubleValue(), is(70.0));
         assertThat(((QuantityType<?>) convertedState).getUnit(), is(Units.PERCENT));
         assertThat(((QuantityType<?>) convertedState).toUnit(Units.ONE).doubleValue(), is(0.7));
index 4f5d3f4039cc15a7545f2c186155e94503c0ff32..1a6ecb07b231ddaa64df040e0bf0e56de14b6c5e 100644 (file)
@@ -14,6 +14,8 @@ package org.openhab.binding.http.internal.converter;
 
 import java.util.function.Consumer;
 
+import javax.measure.format.MeasurementParseException;
+
 import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.eclipse.jdt.annotation.Nullable;
 import org.openhab.binding.http.internal.config.HttpChannelConfig;
@@ -60,7 +62,7 @@ public class NumberItemConverter extends AbstractTransformingItemConverter {
                         return new QuantityType<>(trimmedValue);
                     }
                 }
-            } catch (IllegalArgumentException e) {
+            } catch (IllegalArgumentException | MeasurementParseException e) {
                 // finally failed
             }
         }
index fa8c60bf7a4302487d8307ec41804fba5a635513..dabefc88ddfd197324e7e40fa15dee5255cf7b00 100644 (file)
@@ -66,7 +66,7 @@ public class ConverterTest {
         Assertions.assertEquals(new QuantityType<>(500, Units.WATT), converter.toState("500"));
 
         // no valid value
-        Assertions.assertEquals(UnDefType.UNDEF, converter.toState("100°C"));
+        Assertions.assertEquals(UnDefType.UNDEF, converter.toState("100foo"));
         Assertions.assertEquals(UnDefType.UNDEF, converter.toState("foo"));
         Assertions.assertEquals(UnDefType.UNDEF, converter.toState(""));
     }
index b9f4fad892207065a90a37f7ad49f8be76a2635d..a41be4897d1bd2fc7efaf080d7e2cdf08b42f64b 100644 (file)
@@ -26,7 +26,7 @@ import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
 import javax.measure.Unit;
-import javax.measure.format.ParserException;
+import javax.measure.format.MeasurementParseException;
 
 import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.eclipse.jdt.annotation.Nullable;
@@ -161,7 +161,7 @@ public class MiIoBasicHandler extends MiIoAbstractHandler {
                                     qtc = ((QuantityType<?>) command).toUnit(unit);
                                 }
                             }
-                        } catch (ParserException e) {
+                        } catch (MeasurementParseException e) {
                             // swallow
                         }
                         if (qtc != null) {
index 610b2c5957abf786e844a6dd68a533feab754ba7..bacaeecd5fcf9d842d530e2227a327d104eed1df 100644 (file)
@@ -62,10 +62,10 @@ public class DataBlockTest {
         Optional<Data> dataOpt = mc.parse(DataType.POWER);
         assertTrue(dataOpt.isPresent());
         PowerBlock b = (PowerBlock) dataOpt.get();
-        assertEquals("242.0 W", b.pvPowerSupply.toString(), "PV Supply");
-        assertEquals("14.0 W", b.gridPowerSupply.toString(), "Grid Supply");
-        assertEquals("0.0 W", b.gridPowerConsumpition.toString(), "Grid Consumption");
-        assertEquals("303.0 W", b.batteryPowerSupply.toString(), "Battery Supply");
+        assertEquals("242 W", b.pvPowerSupply.toString(), "PV Supply");
+        assertEquals("14 W", b.gridPowerSupply.toString(), "Grid Supply");
+        assertEquals("0 W", b.gridPowerConsumpition.toString(), "Grid Consumption");
+        assertEquals("303 W", b.batteryPowerSupply.toString(), "Battery Supply");
     }
 
     @Test
@@ -73,10 +73,10 @@ public class DataBlockTest {
         Optional<Data> dataOpt = mcNegativePVSupply.parse(DataType.POWER);
         assertTrue(dataOpt.isPresent());
         PowerBlock b = (PowerBlock) dataOpt.get();
-        assertEquals("-330.0 W", b.pvPowerSupply.toString(), "PV Supply");
-        assertEquals("14.0 W", b.gridPowerSupply.toString(), "Grid Supply");
-        assertEquals("0.0 W", b.gridPowerConsumpition.toString(), "Grid Consumption");
-        assertEquals("303.0 W", b.batteryPowerSupply.toString(), "Battery Supply");
+        assertEquals("-330 W", b.pvPowerSupply.toString(), "PV Supply");
+        assertEquals("14 W", b.gridPowerSupply.toString(), "Grid Supply");
+        assertEquals("0 W", b.gridPowerConsumpition.toString(), "Grid Consumption");
+        assertEquals("303 W", b.batteryPowerSupply.toString(), "Battery Supply");
     }
 
     @Test
index fa0a2ec50e99b009ad1d75fb85216b408a2dd5b3..11d3c4bfdfc6f999657ee6cbf5d603be4a12376b 100644 (file)
@@ -231,10 +231,9 @@ public class ModbusGainOffsetProfile<Q extends Quantity<Q>> implements StateProf
      * When the conversion is towards the handler (towardsItem=false), unit will be ONE
      *
      */
-    @SuppressWarnings("unchecked") // Safe cast since QU = Dimensionless * QU
     private <QU extends Quantity<QU>> QuantityType<QU> applyGainTowardsItem(QuantityType<Dimensionless> qtState,
             QuantityType<QU> gainDelta) {
-        return (QuantityType<QU>) qtState.multiply(gainDelta);
+        return new QuantityType<>(qtState.toBigDecimal().multiply(gainDelta.toBigDecimal()), gainDelta.getUnit());
     }
 
     private QuantityType<Dimensionless> applyGainTowardsHandler(QuantityType<?> qtState, QuantityType<?> gainDelta) {
index c402d0c00dc539b146409964362bef70fbad07a4..5506dbb867da7d86686c41c6fcbcae6785332133 100644 (file)
@@ -172,10 +172,7 @@ public class ModbusGainOffsetProfileTest {
         // Workaround for errors like "java.lang.UnsupportedOperationException: °C is non-linear, cannot convert"
         if (expectedStateUpdateTowardsItem instanceof QuantityType<?>) {
             assertTrue(actualStateUpdateTowardsItem instanceof QuantityType<?>);
-            assertEquals(((QuantityType<?>) expectedStateUpdateTowardsItem).getUnit(),
-                    ((QuantityType<?>) actualStateUpdateTowardsItem).getUnit());
-            assertEquals(((QuantityType<?>) expectedStateUpdateTowardsItem).toBigDecimal(),
-                    ((QuantityType<?>) actualStateUpdateTowardsItem).toBigDecimal());
+            assertEquals(expectedStateUpdateTowardsItem, actualStateUpdateTowardsItem);
         } else {
             assertEquals(expectedStateUpdateTowardsItem, actualStateUpdateTowardsItem);
         }
index 728dae89aee8699c524c8b73aca677988c90aa77..65c903d7514fee4bbfc5a3c6de78760d63e6131a 100644 (file)
@@ -14,6 +14,10 @@ Test-Cases: ${classes;CONCRETE;PUBLIC;NAMED;*Test}
 # A temporary inclusion until an R7 framework is available
 Import-Package: org.osgi.framework.*;version="[1.8,2)",*
 
+# We would like to use the slf4j-api and implementation provided by pax-logging
+-runblacklist.itest-common: \
+       bnd.identity;id='slf4j.api'
+
 # Used by Objenesis/Mockito and not actually optional
 -runsystempackages: sun.reflect
 
index 0637ea707e4fb99c69834bdb256037d9f7b16a06..57f0c618010a233665757361a6d9a8e9220f89a4 100644 (file)
@@ -9,11 +9,8 @@ Fragment-Host: org.openhab.binding.astro
 # done
 #
 -runbundles: \
-       javax.measure.unit-api;version='[1.0.0,1.0.1)',\
        org.eclipse.equinox.event;version='[1.4.300,1.4.301)',\
        org.osgi.service.event;version='[1.4.0,1.4.1)',\
-       tec.uom.lib.uom-lib-common;version='[1.0.3,1.0.4)',\
-       tec.uom.se;version='[1.0.10,1.0.11)',\
        org.opentest4j;version='[1.2.0,1.2.1)',\
        com.sun.xml.bind.jaxb-osgi;version='[2.3.3,2.3.4)',\
        jakarta.xml.bind-api;version='[2.3.3,2.3.4)',\
@@ -44,4 +41,14 @@ Fragment-Host: org.openhab.binding.astro
        org.apache.felix.scr;version='[2.1.26,2.1.27)',\
        org.ops4j.pax.logging.pax-logging-api;version='[2.0.8,2.0.9)',\
        org.osgi.util.function;version='[1.1.0,1.1.1)',\
-       org.osgi.util.promise;version='[1.1.1,1.1.2)'
+       org.osgi.util.promise;version='[1.1.1,1.1.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)',\
+       org.jsr-305;version='[3.0.2,3.0.3)',\
+       org.osgi.service.cm;version='[1.6.0,1.6.1)',\
+       si-units;version='[2.0.1,2.0.2)',\
+       si.uom.si-quantity;version='[2.0.1,2.0.2)',\
+       tech.units.indriya;version='[2.1.2,2.1.3)',\
+       uom-lib-common;version='[2.1.0,2.1.1)'
index df24d0a11685de71ba0184f41ef421d1ecf71f63..fa18b3c7366e13298f92658b9f7311e5a2bdb819 100644 (file)
@@ -13,13 +13,10 @@ Fragment-Host: org.openhab.binding.avmfritz
 # done
 #
 -runbundles: \
-       javax.measure.unit-api;version='[1.0.0,1.0.1)',\
        org.osgi.service.event;version='[1.4.0,1.4.1)',\
        org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
        org.jupnp;version='[2.5.2,2.5.3)',\
        org.eclipse.equinox.event;version='[1.4.300,1.4.301)',\
-       tec.uom.lib.uom-lib-common;version='[1.0.3,1.0.4)',\
-       tec.uom.se;version='[1.0.10,1.0.11)',\
        org.hamcrest;version='[2.2.0,2.2.1)',\
        org.opentest4j;version='[1.2.0,1.2.1)',\
        jakarta.xml.bind-api;version='[2.3.3,2.3.4)',\
@@ -68,4 +65,14 @@ Fragment-Host: org.openhab.binding.avmfritz
        org.apache.xbean.finder;version='[4.18.0,4.18.1)',\
        org.objectweb.asm;version='[9.1.0,9.1.1)',\
        org.objectweb.asm.commons;version='[9.0.0,9.0.1)',\
-       org.objectweb.asm.tree;version='[9.0.0,9.0.1)'
+       org.objectweb.asm.tree;version='[9.0.0,9.0.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)',\
+       org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\
+       org.jsr-305;version='[3.0.2,3.0.3)',\
+       org.osgi.service.cm;version='[1.6.0,1.6.1)',\
+       si-units;version='[2.0.1,2.0.2)',\
+       si.uom.si-quantity;version='[2.0.1,2.0.2)',\
+       tech.units.indriya;version='[2.1.2,2.1.3)',\
+       uom-lib-common;version='[2.1.0,2.1.1)'
index 40a4de909c23639cb4da068bf73fc5648295d749..57c4ad56bc58d190731f3bfff2234f9a5f43ade6 100644 (file)
@@ -20,12 +20,9 @@ Fragment-Host: org.openhab.binding.feed
 # done
 #
 -runbundles: \
-       javax.measure.unit-api;version='[1.0.0,1.0.1)',\
        org.osgi.service.event;version='[1.4.0,1.4.1)',\
        org.eclipse.equinox.event;version='[1.4.300,1.4.301)',\
        org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
-       tec.uom.lib.uom-lib-common;version='[1.0.3,1.0.4)',\
-       tec.uom.se;version='[1.0.10,1.0.11)',\
        org.hamcrest;version='[2.2.0,2.2.1)',\
        org.opentest4j;version='[1.2.0,1.2.1)',\
        com.sun.xml.bind.jaxb-osgi;version='[2.3.3,2.3.4)',\
@@ -71,4 +68,13 @@ Fragment-Host: org.openhab.binding.feed
        org.apache.xbean.finder;version='[4.18.0,4.18.1)',\
        org.objectweb.asm;version='[9.1.0,9.1.1)',\
        org.objectweb.asm.commons;version='[9.0.0,9.0.1)',\
-       org.objectweb.asm.tree;version='[9.0.0,9.0.1)'
+       org.objectweb.asm.tree;version='[9.0.0,9.0.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)',\
+       org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\
+       org.jsr-305;version='[3.0.2,3.0.3)',\
+       si-units;version='[2.0.1,2.0.2)',\
+       si.uom.si-quantity;version='[2.0.1,2.0.2)',\
+       tech.units.indriya;version='[2.1.2,2.1.3)',\
+       uom-lib-common;version='[2.1.0,2.1.1)'
index a54720aaa0aaeb4af4d6a72a1fe2eee6b03ae06f..7cc750ff2572852359b512ee73d8c8eb87844b01 100644 (file)
@@ -16,13 +16,10 @@ Fragment-Host: org.openhab.binding.hue
 # done
 #
 -runbundles: \
-       javax.measure.unit-api;version='[1.0.0,1.0.1)',\
        org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
        org.eclipse.equinox.event;version='[1.4.300,1.4.301)',\
        org.jupnp;version='[2.5.2,2.5.3)',\
        org.osgi.service.event;version='[1.4.0,1.4.1)',\
-       tec.uom.lib.uom-lib-common;version='[1.0.3,1.0.4)',\
-       tec.uom.se;version='[1.0.10,1.0.11)',\
        org.hamcrest;version='[2.2.0,2.2.1)',\
        org.opentest4j;version='[1.2.0,1.2.1)',\
        org.eclipse.jdt.annotation;version='[2.2.100,2.2.101)',\
@@ -72,4 +69,14 @@ Fragment-Host: org.openhab.binding.hue
        org.apache.xbean.finder;version='[4.18.0,4.18.1)',\
        org.objectweb.asm;version='[9.1.0,9.1.1)',\
        org.objectweb.asm.commons;version='[9.0.0,9.0.1)',\
-       org.objectweb.asm.tree;version='[9.0.0,9.0.1)'
+       org.objectweb.asm.tree;version='[9.0.0,9.0.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)',\
+       org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\
+       org.jsr-305;version='[3.0.2,3.0.3)',\
+       org.osgi.service.cm;version='[1.6.0,1.6.1)',\
+       si-units;version='[2.0.1,2.0.2)',\
+       si.uom.si-quantity;version='[2.0.1,2.0.2)',\
+       tech.units.indriya;version='[2.1.2,2.1.3)',\
+       uom-lib-common;version='[2.1.0,2.1.1)'
index dd3e0e2f10b41015c249268889f645db884d61c2..73f7244c4051beedc64d893387a0ba8a214e70e7 100644 (file)
@@ -16,12 +16,9 @@ Fragment-Host: org.openhab.binding.max
 # done
 #
 -runbundles: \
-       javax.measure.unit-api;version='[1.0.0,1.0.1)',\
        org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
        org.eclipse.equinox.event;version='[1.4.300,1.4.301)',\
        org.osgi.service.event;version='[1.4.0,1.4.1)',\
-       tec.uom.lib.uom-lib-common;version='[1.0.3,1.0.4)',\
-       tec.uom.se;version='[1.0.10,1.0.11)',\
        org.hamcrest;version='[2.2.0,2.2.1)',\
        org.opentest4j;version='[1.2.0,1.2.1)',\
        com.sun.xml.bind.jaxb-osgi;version='[2.3.3,2.3.4)',\
@@ -59,4 +56,14 @@ Fragment-Host: org.openhab.binding.max
        org.eclipse.jetty.util.ajax;version='[9.4.38,9.4.39)',\
        org.ops4j.pax.logging.pax-logging-api;version='[2.0.8,2.0.9)',\
        org.osgi.util.function;version='[1.1.0,1.1.1)',\
-       org.osgi.util.promise;version='[1.1.1,1.1.2)'
+       org.osgi.util.promise;version='[1.1.1,1.1.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)',\
+       org.jsr-305;version='[3.0.2,3.0.3)',\
+       org.osgi.service.cm;version='[1.6.0,1.6.1)',\
+       si-units;version='[2.0.1,2.0.2)',\
+       si.uom.si-quantity;version='[2.0.1,2.0.2)',\
+       tech.units.indriya;version='[2.1.2,2.1.3)',\
+       uom-lib-common;version='[2.1.0,2.1.1)'
index 8f7625484fcf1ee15c1483f97b00358639cd9ec2..03f672551bbe3922edc5a91bd77f415dfb0b223c 100644 (file)
@@ -17,11 +17,8 @@ Fragment-Host: org.openhab.binding.modbus
 # done
 #
 -runbundles: \
-       javax.measure.unit-api;version='[1.0.0,1.0.1)',\
        org.eclipse.equinox.event;version='[1.4.300,1.4.301)',\
        org.osgi.service.event;version='[1.4.0,1.4.1)',\
-       tec.uom.lib.uom-lib-common;version='[1.0.3,1.0.4)',\
-       tec.uom.se;version='[1.0.10,1.0.11)',\
        org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
        nrjavaserial;version='[5.2.1,5.2.2)',\
        org.hamcrest;version='[2.2.0,2.2.1)',\
@@ -68,4 +65,14 @@ Fragment-Host: org.openhab.binding.modbus
        org.eclipse.jetty.util.ajax;version='[9.4.38,9.4.39)',\
        org.ops4j.pax.logging.pax-logging-api;version='[2.0.8,2.0.9)',\
        org.osgi.util.function;version='[1.1.0,1.1.1)',\
-       org.osgi.util.promise;version='[1.1.1,1.1.2)'
+       org.osgi.util.promise;version='[1.1.1,1.1.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)',\
+       org.jsr-305;version='[3.0.2,3.0.3)',\
+       org.osgi.service.cm;version='[1.6.0,1.6.1)',\
+       si-units;version='[2.0.1,2.0.2)',\
+       si.uom.si-quantity;version='[2.0.1,2.0.2)',\
+       tech.units.indriya;version='[2.1.2,2.1.3)',\
+       uom-lib-common;version='[2.1.0,2.1.1)'
index d1d48ff67b9aa9926bb3c010de5a30a0b4e88ac9..ba3a0469bf63d652464406e1217b6dabd98b2258 100644 (file)
@@ -16,14 +16,11 @@ Fragment-Host: org.openhab.binding.nest
 # done
 #
 -runbundles: \
-       javax.measure.unit-api;version='[1.0.0,1.0.1)',\
        org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
        org.eclipse.equinox.event;version='[1.4.300,1.4.301)',\
        org.osgi.service.event;version='[1.4.0,1.4.1)',\
        org.osgi.service.jaxrs;version='[1.0.0,1.0.1)',\
        org.osgi.util.function;version='[1.1.0,1.1.1)',\
-       tec.uom.lib.uom-lib-common;version='[1.0.3,1.0.4)',\
-       tec.uom.se;version='[1.0.10,1.0.11)',\
        org.hamcrest;version='[2.2.0,2.2.1)',\
        org.opentest4j;version='[1.2.0,1.2.1)',\
        jakarta.xml.bind-api;version='[2.3.3,2.3.4)',\
@@ -96,6 +93,14 @@ Fragment-Host: org.openhab.binding.nest
        org.apache.ws.xmlschema.core;version='[2.2.5,2.2.6)',\
        org.objectweb.asm.tree.analysis;version='[9.0.0,9.0.1)',\
        org.objectweb.asm.util;version='[9.0.0,9.0.1)',\
-       org.ops4j.pax.swissbox.optional.jcl;version='[1.8.4,1.8.5)',\
        org.osgi.service.cm;version='[1.6.0,1.6.1)',\
-       stax2-api;version='[4.2.1,4.2.2)'
+       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)',\
+       org.jsr-305;version='[3.0.2,3.0.3)',\
+       si-units;version='[2.0.1,2.0.2)',\
+       si.uom.si-quantity;version='[2.0.1,2.0.2)',\
+       tech.units.indriya;version='[2.1.2,2.1.3)',\
+       uom-lib-common;version='[2.1.0,2.1.1)'
index 9fee1b9e8e92620efd55bd7b13f0b4442b78099b..ef0cfa67a026e0faf16f8eb87a59f2ed5d92e242 100644 (file)
@@ -16,13 +16,10 @@ Fragment-Host: org.openhab.binding.ntp
 # done
 #
 -runbundles: \
-       javax.measure.unit-api;version='[1.0.0,1.0.1)',\
        org.apache.commons.commons-net;version='[3.7.2,3.7.3)',\
        org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
        org.eclipse.equinox.event;version='[1.4.300,1.4.301)',\
        org.osgi.service.event;version='[1.4.0,1.4.1)',\
-       tec.uom.lib.uom-lib-common;version='[1.0.3,1.0.4)',\
-       tec.uom.se;version='[1.0.10,1.0.11)',\
        org.hamcrest;version='[2.2.0,2.2.1)',\
        org.opentest4j;version='[1.2.0,1.2.1)',\
        com.sun.xml.bind.jaxb-osgi;version='[2.3.3,2.3.4)',\
@@ -63,4 +60,14 @@ Fragment-Host: org.openhab.binding.ntp
        org.eclipse.jetty.util.ajax;version='[9.4.38,9.4.39)',\
        org.ops4j.pax.logging.pax-logging-api;version='[2.0.8,2.0.9)',\
        org.osgi.util.function;version='[1.1.0,1.1.1)',\
-       org.osgi.util.promise;version='[1.1.1,1.1.2)'
+       org.osgi.util.promise;version='[1.1.1,1.1.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)',\
+       org.jsr-305;version='[3.0.2,3.0.3)',\
+       org.osgi.service.cm;version='[1.6.0,1.6.1)',\
+       si-units;version='[2.0.1,2.0.2)',\
+       si.uom.si-quantity;version='[2.0.1,2.0.2)',\
+       tech.units.indriya;version='[2.1.2,2.1.3)',\
+       uom-lib-common;version='[2.1.0,2.1.1)'
index ce15074c856b99124536bfdc5f290e8814cefbfb..27db11a0951b1e4f6161612796cb87086d5497aa 100644 (file)
@@ -18,12 +18,9 @@ Fragment-Host: org.openhab.binding.systeminfo
 # done
 #
 -runbundles: \
-       javax.measure.unit-api;version='[1.0.0,1.0.1)',\
        org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
        org.osgi.service.event;version='[1.4.0,1.4.1)',\
        org.eclipse.equinox.event;version='[1.4.300,1.4.301)',\
-       tec.uom.lib.uom-lib-common;version='[1.0.3,1.0.4)',\
-       tec.uom.se;version='[1.0.10,1.0.11)',\
        com.sun.jna;version='[5.5.0,5.5.1)',\
        com.sun.jna.platform;version='[5.5.0,5.5.1)',\
        org.hamcrest;version='[2.2.0,2.2.1)',\
@@ -67,4 +64,14 @@ Fragment-Host: org.openhab.binding.systeminfo
        org.eclipse.jetty.util.ajax;version='[9.4.38,9.4.39)',\
        org.ops4j.pax.logging.pax-logging-api;version='[2.0.8,2.0.9)',\
        org.osgi.util.function;version='[1.1.0,1.1.1)',\
-       org.osgi.util.promise;version='[1.1.1,1.1.2)'
+       org.osgi.util.promise;version='[1.1.1,1.1.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)',\
+       org.jsr-305;version='[3.0.2,3.0.3)',\
+       org.osgi.service.cm;version='[1.6.0,1.6.1)',\
+       si-units;version='[2.0.1,2.0.2)',\
+       si.uom.si-quantity;version='[2.0.1,2.0.2)',\
+       tech.units.indriya;version='[2.1.2,2.1.3)',\
+       uom-lib-common;version='[2.1.0,2.1.1)'
index 1e666e1e53597efe0b421bdcd7e6aad0bfc0679d..eff86be11c41d7d2c1e5f799c0c7d2e9b393f96e 100644 (file)
@@ -16,13 +16,10 @@ Fragment-Host: org.openhab.binding.tradfri
 # done
 #
 -runbundles: \
-       javax.measure.unit-api;version='[1.0.0,1.0.1)',\
        org.osgi.service.event;version='[1.4.0,1.4.1)',\
        org.eclipse.equinox.event;version='[1.4.300,1.4.301)',\
        javax.jmdns;version='[3.5.6,3.5.7)',\
        org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
-       tec.uom.lib.uom-lib-common;version='[1.0.3,1.0.4)',\
-       tec.uom.se;version='[1.0.10,1.0.11)',\
        org.eclipse.californium.core;version='[2.0.0,2.0.1)',\
        org.eclipse.californium.element-connector;version='[2.0.0,2.0.1)',\
        org.eclipse.californium.scandium;version='[2.0.0,2.0.1)',\
@@ -69,4 +66,14 @@ Fragment-Host: org.openhab.binding.tradfri
        org.eclipse.jetty.util.ajax;version='[9.4.38,9.4.39)',\
        org.ops4j.pax.logging.pax-logging-api;version='[2.0.8,2.0.9)',\
        org.osgi.util.function;version='[1.1.0,1.1.1)',\
-       org.osgi.util.promise;version='[1.1.1,1.1.2)'
+       org.osgi.util.promise;version='[1.1.1,1.1.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)',\
+       org.jsr-305;version='[3.0.2,3.0.3)',\
+       org.osgi.service.cm;version='[1.6.0,1.6.1)',\
+       si-units;version='[2.0.1,2.0.2)',\
+       si.uom.si-quantity;version='[2.0.1,2.0.2)',\
+       tech.units.indriya;version='[2.1.2,2.1.3)',\
+       uom-lib-common;version='[2.1.0,2.1.1)'
index 20b13f27444a2f83a4033cac067138c16c40e702..6493726d4f4b2dadbf37a5ee10e661aa4de147b0 100644 (file)
@@ -16,13 +16,10 @@ Fragment-Host: org.openhab.binding.wemo
 # done
 #
 -runbundles: \
-       javax.measure.unit-api;version='[1.0.0,1.0.1)',\
        org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
        org.eclipse.equinox.event;version='[1.4.300,1.4.301)',\
        org.jupnp;version='[2.5.2,2.5.3)',\
        org.osgi.service.event;version='[1.4.0,1.4.1)',\
-       tec.uom.lib.uom-lib-common;version='[1.0.3,1.0.4)',\
-       tec.uom.se;version='[1.0.10,1.0.11)',\
        org.hamcrest;version='[2.2.0,2.2.1)',\
        org.opentest4j;version='[1.2.0,1.2.1)',\
        com.sun.xml.bind.jaxb-osgi;version='[2.3.3,2.3.4)',\
@@ -55,7 +52,6 @@ Fragment-Host: org.openhab.binding.wemo
        org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\
        biz.aQute.tester.junit-platform;version='[5.3.0,5.3.1)',\
        com.google.gson;version='[2.8.6,2.8.7)',\
-       org.apache.commons.lang3;version='[3.12.0,3.12.1)',\
        org.apache.felix.configadmin;version='[1.9.20,1.9.21)',\
        org.apache.felix.scr;version='[2.1.26,2.1.27)',\
        org.eclipse.jetty.client;version='[9.4.38,9.4.39)',\
@@ -77,4 +73,14 @@ Fragment-Host: org.openhab.binding.wemo
        org.apache.xbean.finder;version='[4.18.0,4.18.1)',\
        org.objectweb.asm;version='[9.1.0,9.1.1)',\
        org.objectweb.asm.commons;version='[9.0.0,9.0.1)',\
-       org.objectweb.asm.tree;version='[9.0.0,9.0.1)'
+       org.objectweb.asm.tree;version='[9.0.0,9.0.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)',\
+       org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\
+       org.jsr-305;version='[3.0.2,3.0.3)',\
+       org.osgi.service.cm;version='[1.6.0,1.6.1)',\
+       si-units;version='[2.0.1,2.0.2)',\
+       si.uom.si-quantity;version='[2.0.1,2.0.2)',\
+       tech.units.indriya;version='[2.1.2,2.1.3)',\
+       uom-lib-common;version='[2.1.0,2.1.1)'
index 02c4554d17ae82b537c5b69617edcd31bdaba094..777357760fabe509ddfbe345a034ae38f864cdc6 100644 (file)
@@ -16,12 +16,9 @@ Fragment-Host: org.openhab.persistence.mapdb
 # done
 #
 -runbundles: \
-       javax.measure.unit-api;version='[1.0.0,1.0.1)',\
        org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
        org.eclipse.equinox.event;version='[1.4.300,1.4.301)',\
        org.osgi.service.event;version='[1.4.0,1.4.1)',\
-       tec.uom.lib.uom-lib-common;version='[1.0.3,1.0.4)',\
-       tec.uom.se;version='[1.0.10,1.0.11)',\
        org.hamcrest;version='[2.2.0,2.2.1)',\
        org.opentest4j;version='[1.2.0,1.2.1)',\
        com.sun.xml.bind.jaxb-osgi;version='[2.3.3,2.3.4)',\
@@ -51,4 +48,13 @@ Fragment-Host: org.openhab.persistence.mapdb
        org.eclipse.jetty.util.ajax;version='[9.4.38,9.4.39)',\
        org.ops4j.pax.logging.pax-logging-api;version='[2.0.8,2.0.9)',\
        org.osgi.util.function;version='[1.1.0,1.1.1)',\
-       org.osgi.util.promise;version='[1.1.1,1.1.2)'
+       org.osgi.util.promise;version='[1.1.1,1.1.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)',\
+       org.jsr-305;version='[3.0.2,3.0.3)',\
+       si-units;version='[2.0.1,2.0.2)',\
+       si.uom.si-quantity;version='[2.0.1,2.0.2)',\
+       tech.units.indriya;version='[2.1.2,2.1.3)',\
+       uom-lib-common;version='[2.1.0,2.1.1)'
index 3cc2adf54b3d441658efeb6bac3a6265c1af5bca..9bb30ab9dc899c050a9041159b81661156d9bb25 100644 (file)
@@ -1,6 +1,6 @@
 checkstyle.headerCheck.content=^/\\*\\*$\\n^ \\* Copyright \\(c\\) {0}-{1} Contributors to the openHAB project$\\n^ \\*$\\n^ \\* See the NOTICE file\\(s\\) distributed with this work for additional$\\n^ \\* information.$\\n^ \\*$\\n^ \\* This program and the accompanying materials are made available under the$\\n^ \\* terms of the Eclipse Public License 2\\.0 which is available at$\\n^ \\* http://www.eclipse.org/legal/epl\\-2\\.0$\\n^ \\*$\\n^ \\* SPDX-License-Identifier: EPL-2.0$
 checkstyle.headerCheck.values=2010,2021
-checkstyle.forbiddenPackageUsageCheck.forbiddenPackages=com.google.common,gnu.io,javax.comm,org.apache.commons,org.joda.time,tec.uom.se
+checkstyle.forbiddenPackageUsageCheck.forbiddenPackages=com.google.common,gnu.io,javax.comm,org.apache.commons,org.joda.time,si.uom,tech.units
 checkstyle.forbiddenPackageUsageCheck.exceptions=
 checkstyle.requiredFilesCheck.files=pom.xml
 checkstyle.karafAddonFeatureCheck.featureNameMappings=-transform-:-transformation-,-io-:-misc-