From 8e902f63243a11e2dd9898fade150312184aa23c Mon Sep 17 00:00:00 2001 From: J-N-K Date: Tue, 21 Mar 2023 21:03:05 +0100 Subject: [PATCH] Bump spotless to 2.35 and Eclipse Java Formatter to 4.26 (#14645) Signed-off-by: Jan N. Klug --- .../handler/FloureonThermostatHandler.java | 2 +- .../handler/SensorThermostatThingHandler.java | 8 +++---- .../internal/handler/SensorThingHandler.java | 4 ++-- .../discovery/DiscoveryServiceManager.java | 4 ++-- .../providers/DsDeviceThingTypeProvider.java | 5 ++-- .../handler/ElroConnectsBridgeHandler.java | 2 +- .../console/FreeboxCommandExtension.java | 4 ++-- .../internal/console/HueCommandExtension.java | 4 ++-- .../internal/handler/DeviceThingHandler.java | 2 +- .../imported/RuntimeTypeAdapterFactory.java | 6 ++--- .../console/LGWebOSCommandExtension.java | 4 ++-- .../console/LinkyCommandExtension.java | 4 ++-- .../internal/component/AlarmControlPanel.java | 13 ++++------ .../internal/component/ComponentFactory.java | 2 +- .../internal/component/Cover.java | 8 +++---- .../component/DefaultSchemaLight.java | 23 +++++++++--------- .../internal/component/DeviceTrigger.java | 3 +-- .../homeassistant/internal/component/Fan.java | 8 +++---- .../internal/component/Lock.java | 8 +++---- .../internal/component/Number.java | 8 +++---- .../internal/component/Select.java | 8 +++---- .../internal/component/Sensor.java | 4 ++-- .../AdvancedMultisensorThingHandler.java | 4 ++-- .../pilight/internal/PilightConnector.java | 2 +- .../console/PowermaxCommandExtension.java | 4 ++-- .../binding/smartmeter/TestMeterReading.java | 2 +- .../console/SomfyTahomaCommandExtension.java | 4 ++-- .../bridge/slip/SCrunProductCommand.java | 2 +- .../accessories/HomekitHeaterCoolerImpl.java | 2 +- .../HomekitTemperatureSensorImpl.java | 4 ++-- .../accessories/HomekitThermostatImpl.java | 8 +++---- .../internal/DynamoDBBigDecimalItem.java | 20 ++++++++-------- .../dynamodb/internal/DynamoDBStringItem.java | 24 +++++++++---------- .../transform/bin2json/internal/Bin2Json.java | 2 +- .../AbstractMieleThingHandlerTest.java | 2 +- pom.xml | 11 +++++---- 36 files changed, 110 insertions(+), 115 deletions(-) diff --git a/bundles/org.openhab.binding.broadlinkthermostat/src/main/java/org/openhab/binding/broadlinkthermostat/internal/handler/FloureonThermostatHandler.java b/bundles/org.openhab.binding.broadlinkthermostat/src/main/java/org/openhab/binding/broadlinkthermostat/internal/handler/FloureonThermostatHandler.java index bfad6c6944c..26e261ec545 100644 --- a/bundles/org.openhab.binding.broadlinkthermostat/src/main/java/org/openhab/binding/broadlinkthermostat/internal/handler/FloureonThermostatHandler.java +++ b/bundles/org.openhab.binding.broadlinkthermostat/src/main/java/org/openhab/binding/broadlinkthermostat/internal/handler/FloureonThermostatHandler.java @@ -216,7 +216,7 @@ public class FloureonThermostatHandler extends BroadlinkBaseHandler { try { new SetTimeCommand(tob(zonedDateTime.getHour()), tob(zonedDateTime.getMinute()), tob(zonedDateTime.getSecond()), tob(zonedDateTime.getDayOfWeek().getValue())) - .execute(floureonDevice); + .execute(floureonDevice); } catch (Exception e) { logger.warn("Error while setting time of {} to {}: {}", thing.getUID(), command, e.getMessage()); } diff --git a/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/handler/SensorThermostatThingHandler.java b/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/handler/SensorThermostatThingHandler.java index a7780f47057..e0f4b455f87 100644 --- a/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/handler/SensorThermostatThingHandler.java +++ b/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/handler/SensorThermostatThingHandler.java @@ -137,10 +137,10 @@ public class SensorThermostatThingHandler extends SensorBaseThingHandler { String mode = thermostatMode != null ? thermostatMode.name() : ThermostatMode.UNKNOWN.name(); switch (channelUID.getId()) { case CHANNEL_THERMOSTAT_LOCKED -> updateSwitchChannel(channelUID, newConfig.locked); - case CHANNEL_HEATSETPOINT -> updateQuantityTypeChannel(channelUID, newConfig.heatsetpoint, CELSIUS, - 1.0 / 100); - case CHANNEL_TEMPERATURE_OFFSET -> updateQuantityTypeChannel(channelUID, newConfig.offset, CELSIUS, - 1.0 / 100); + case CHANNEL_HEATSETPOINT -> + updateQuantityTypeChannel(channelUID, newConfig.heatsetpoint, CELSIUS, 1.0 / 100); + case CHANNEL_TEMPERATURE_OFFSET -> + updateQuantityTypeChannel(channelUID, newConfig.offset, CELSIUS, 1.0 / 100); case CHANNEL_THERMOSTAT_MODE -> updateState(channelUID, new StringType(mode)); case CHANNEL_EXTERNAL_WINDOW_OPEN -> { Boolean open = newConfig.externalwindowopen; diff --git a/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/handler/SensorThingHandler.java b/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/handler/SensorThingHandler.java index 9dc3eb4045c..0d2322dcc6e 100644 --- a/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/handler/SensorThingHandler.java +++ b/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/handler/SensorThingHandler.java @@ -157,8 +157,8 @@ public class SensorThingHandler extends SensorBaseThingHandler { case CHANNEL_VIBRATION -> updateSwitchChannel(channelUID, newState.vibration); case CHANNEL_CARBONMONOXIDE -> updateSwitchChannel(channelUID, newState.carbonmonoxide); case CHANNEL_AIRQUALITY -> updateStringChannel(channelUID, newState.airquality); - case CHANNEL_AIRQUALITYPPB -> updateQuantityTypeChannel(channelUID, newState.airqualityppb, - PARTS_PER_BILLION); + case CHANNEL_AIRQUALITYPPB -> + updateQuantityTypeChannel(channelUID, newState.airqualityppb, PARTS_PER_BILLION); case CHANNEL_MOISTURE -> updateQuantityTypeChannel(channelUID, newState.moisture, PERCENT); case CHANNEL_BUTTON -> updateDecimalTypeChannel(channelUID, newState.buttonevent); case CHANNEL_BUTTONEVENT -> { diff --git a/bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/discovery/DiscoveryServiceManager.java b/bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/discovery/DiscoveryServiceManager.java index 84f81eda20a..5893131873c 100644 --- a/bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/discovery/DiscoveryServiceManager.java +++ b/bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/discovery/DiscoveryServiceManager.java @@ -211,7 +211,7 @@ public class DiscoveryServiceManager if (discoveryServices.get(DsDeviceThingTypeProvider.SupportedThingTypes.circuit.toString()) != null) { ((DeviceDiscoveryService) discoveryServices .get(DsDeviceThingTypeProvider.SupportedThingTypes.circuit.toString())) - .onDeviceAdded(device); + .onDeviceAdded(device); } } } catch (RuntimeException ex) { @@ -240,7 +240,7 @@ public class DiscoveryServiceManager if (discoveryServices.get(DigitalSTROMBindingConstants.THING_TYPE_ZONE_TEMERATURE_CONTROL.toString()) != null) { ((ZoneTemperatureControlDiscoveryService) discoveryServices .get(DigitalSTROMBindingConstants.THING_TYPE_ZONE_TEMERATURE_CONTROL.toString())) - .configChanged(tempControlStatus); + .configChanged(tempControlStatus); } } diff --git a/bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/providers/DsDeviceThingTypeProvider.java b/bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/providers/DsDeviceThingTypeProvider.java index aef01b50e22..cf11f1ece75 100644 --- a/bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/providers/DsDeviceThingTypeProvider.java +++ b/bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/providers/DsDeviceThingTypeProvider.java @@ -154,7 +154,7 @@ public class DsDeviceThingTypeProvider extends BaseDsI18n implements ThingTypePr thingTypeBuilder.withChannelDefinitions(Arrays.asList(new ChannelDefinitionBuilder( DsChannelTypeProvider.SHADE, new ChannelTypeUID(DigitalSTROMBindingConstants.BINDING_ID, DsChannelTypeProvider.SHADE)) - .build())); + .build())); } if (SupportedThingTypes.circuit.equals(supportedThingType)) { List channelDefinitions = new ArrayList<>(3); @@ -162,7 +162,8 @@ public class DsDeviceThingTypeProvider extends BaseDsI18n implements ThingTypePr channelDefinitions.add(new ChannelDefinitionBuilder( DsChannelTypeProvider.getMeteringChannelID(meteringType, MeteringUnitsEnum.WH, false), new ChannelTypeUID(DigitalSTROMBindingConstants.BINDING_ID, DsChannelTypeProvider - .getMeteringChannelID(meteringType, MeteringUnitsEnum.WH, false))).build()); + .getMeteringChannelID(meteringType, MeteringUnitsEnum.WH, false))) + .build()); } thingTypeBuilder.withChannelDefinitions(channelDefinitions); } diff --git a/bundles/org.openhab.binding.elroconnects/src/main/java/org/openhab/binding/elroconnects/internal/handler/ElroConnectsBridgeHandler.java b/bundles/org.openhab.binding.elroconnects/src/main/java/org/openhab/binding/elroconnects/internal/handler/ElroConnectsBridgeHandler.java index 04261495da3..d387dbb4ea2 100644 --- a/bundles/org.openhab.binding.elroconnects/src/main/java/org/openhab/binding/elroconnects/internal/handler/ElroConnectsBridgeHandler.java +++ b/bundles/org.openhab.binding.elroconnects/src/main/java/org/openhab/binding/elroconnects/internal/handler/ElroConnectsBridgeHandler.java @@ -853,7 +853,7 @@ public class ElroConnectsBridgeHandler extends BaseBridgeHandler { logger.debug("Sync scenes"); ElroConnectsMessage elroMessage = new ElroConnectsMessage(msgIdIncrement(), connectorId, ctrlKey, ELRO_SYNC_SCENES, legacyFirmware).withSceneGroup(0).withSceneContent(SYNC_COMMAND) - .withAnswerContent(SYNC_COMMAND); + .withAnswerContent(SYNC_COMMAND); sendElroMessage(elroMessage, true); } diff --git a/bundles/org.openhab.binding.freebox/src/main/java/org/openhab/binding/freebox/internal/console/FreeboxCommandExtension.java b/bundles/org.openhab.binding.freebox/src/main/java/org/openhab/binding/freebox/internal/console/FreeboxCommandExtension.java index 48fd8c21df3..1899d052102 100644 --- a/bundles/org.openhab.binding.freebox/src/main/java/org/openhab/binding/freebox/internal/console/FreeboxCommandExtension.java +++ b/bundles/org.openhab.binding.freebox/src/main/java/org/openhab/binding/freebox/internal/console/FreeboxCommandExtension.java @@ -106,8 +106,8 @@ public class FreeboxCommandExtension extends AbstractConsoleCommandExtension imp if (cursorArgumentIndex <= 0) { return new StringsCompleter(thingRegistry.getAll().stream() .filter(t -> FreeboxBindingConstants.FREEBOX_BRIDGE_TYPE_SERVER.equals(t.getThingTypeUID())) - .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true).complete(args, - cursorArgumentIndex, cursorPosition, candidates); + .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true) + .complete(args, cursorArgumentIndex, cursorPosition, candidates); } else if (cursorArgumentIndex == 1) { Thing thing = getThing(args[0]); if (thing != null && FreeboxBindingConstants.FREEBOX_BRIDGE_TYPE_SERVER.equals(thing.getThingTypeUID())) { diff --git a/bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/console/HueCommandExtension.java b/bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/console/HueCommandExtension.java index 424f57c52d4..befe496dabd 100644 --- a/bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/console/HueCommandExtension.java +++ b/bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/console/HueCommandExtension.java @@ -127,8 +127,8 @@ public class HueCommandExtension extends AbstractConsoleCommandExtension impleme return new StringsCompleter(thingRegistry.getAll().stream() .filter(t -> HueBindingConstants.THING_TYPE_BRIDGE.equals(t.getThingTypeUID()) || HueBindingConstants.THING_TYPE_GROUP.equals(t.getThingTypeUID())) - .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true).complete(args, - cursorArgumentIndex, cursorPosition, candidates); + .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true) + .complete(args, cursorArgumentIndex, cursorPosition, candidates); } else if (cursorArgumentIndex == 1) { Thing thing = getThing(args[0]); if (thing != null && HueBindingConstants.THING_TYPE_BRIDGE.equals(thing.getThingTypeUID())) { diff --git a/bundles/org.openhab.binding.knx/src/main/java/org/openhab/binding/knx/internal/handler/DeviceThingHandler.java b/bundles/org.openhab.binding.knx/src/main/java/org/openhab/binding/knx/internal/handler/DeviceThingHandler.java index 8fa423cdcee..b7612cdd132 100644 --- a/bundles/org.openhab.binding.knx/src/main/java/org/openhab/binding/knx/internal/handler/DeviceThingHandler.java +++ b/bundles/org.openhab.binding.knx/src/main/java/org/openhab/binding/knx/internal/handler/DeviceThingHandler.java @@ -354,7 +354,7 @@ public class DeviceThingHandler extends BaseThingHandler implements GroupAddress } frequency = ((BigDecimal) Objects.requireNonNullElse( channel.getConfiguration().get(KNXBindingConstants.REPEAT_FREQUENCY), BigDecimal.ZERO)) - .intValue(); + .intValue(); } else { // disable dimming by binding frequency = 0; diff --git a/bundles/org.openhab.binding.lametrictime/src/main/java/org/openhab/binding/lametrictime/internal/api/common/impl/typeadapters/imported/RuntimeTypeAdapterFactory.java b/bundles/org.openhab.binding.lametrictime/src/main/java/org/openhab/binding/lametrictime/internal/api/common/impl/typeadapters/imported/RuntimeTypeAdapterFactory.java index e91895378e1..c76c32a5a11 100644 --- a/bundles/org.openhab.binding.lametrictime/src/main/java/org/openhab/binding/lametrictime/internal/api/common/impl/typeadapters/imported/RuntimeTypeAdapterFactory.java +++ b/bundles/org.openhab.binding.lametrictime/src/main/java/org/openhab/binding/lametrictime/internal/api/common/impl/typeadapters/imported/RuntimeTypeAdapterFactory.java @@ -139,9 +139,9 @@ import com.google.gson.stream.MalformedJsonException; * *
  *    {@code
- *   shapeAdapter.registerSubtype(Rectangle.class, "Rectangle");
- *   shapeAdapter.registerSubtype(Circle.class, "Circle");
- *   shapeAdapter.registerSubtype(Diamond.class, "Diamond");
+ * shapeAdapter.registerSubtype(Rectangle.class, "Rectangle");
+ * shapeAdapter.registerSubtype(Circle.class, "Circle");
+ * shapeAdapter.registerSubtype(Diamond.class, "Diamond");
  * }
  * 
* diff --git a/bundles/org.openhab.binding.lgwebos/src/main/java/org/openhab/binding/lgwebos/internal/console/LGWebOSCommandExtension.java b/bundles/org.openhab.binding.lgwebos/src/main/java/org/openhab/binding/lgwebos/internal/console/LGWebOSCommandExtension.java index 90e91c38d51..4f2b7c9088c 100644 --- a/bundles/org.openhab.binding.lgwebos/src/main/java/org/openhab/binding/lgwebos/internal/console/LGWebOSCommandExtension.java +++ b/bundles/org.openhab.binding.lgwebos/src/main/java/org/openhab/binding/lgwebos/internal/console/LGWebOSCommandExtension.java @@ -116,8 +116,8 @@ public class LGWebOSCommandExtension extends AbstractConsoleCommandExtension imp if (cursorArgumentIndex <= 0) { return new StringsCompleter(thingRegistry.getAll().stream() .filter(t -> LGWebOSBindingConstants.THING_TYPE_WEBOSTV.equals(t.getThingTypeUID())) - .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true).complete(args, - cursorArgumentIndex, cursorPosition, candidates); + .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true) + .complete(args, cursorArgumentIndex, cursorPosition, candidates); } else if (cursorArgumentIndex == 1) { Thing thing = getThing(args[0]); if (thing != null && LGWebOSBindingConstants.THING_TYPE_WEBOSTV.equals(thing.getThingTypeUID())) { diff --git a/bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/console/LinkyCommandExtension.java b/bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/console/LinkyCommandExtension.java index cf4f495e59e..3da31b36a84 100644 --- a/bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/console/LinkyCommandExtension.java +++ b/bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/console/LinkyCommandExtension.java @@ -140,8 +140,8 @@ public class LinkyCommandExtension extends AbstractConsoleCommandExtension imple if (cursorArgumentIndex <= 0) { return new StringsCompleter(thingRegistry.getAll().stream() .filter(t -> LinkyBindingConstants.THING_TYPE_LINKY.equals(t.getThingTypeUID())) - .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true).complete(args, - cursorArgumentIndex, cursorPosition, candidates); + .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true) + .complete(args, cursorArgumentIndex, cursorPosition, candidates); } else if (cursorArgumentIndex == 1) { Thing thing = getThing(args[0]); if (thing != null && LinkyBindingConstants.THING_TYPE_LINKY.equals(thing.getThingTypeUID())) { diff --git a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/AlarmControlPanel.java b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/AlarmControlPanel.java index b80b505eb5e..8d213e7075c 100644 --- a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/AlarmControlPanel.java +++ b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/AlarmControlPanel.java @@ -76,27 +76,24 @@ public class AlarmControlPanel extends AbstractComponent { buildChannel(SWITCH_CHANNEL_ID, value, channelConfiguration.getName(), componentConfiguration.getUpdateListener()) - .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate()) - .commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(), - channelConfiguration.getQos()) - .build(); + .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate()) + .commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(), + channelConfiguration.getQos()) + .build(); } } diff --git a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/DefaultSchemaLight.java b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/DefaultSchemaLight.java index 1eb49ba3fa1..55d0b310e6c 100644 --- a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/DefaultSchemaLight.java +++ b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/DefaultSchemaLight.java @@ -71,11 +71,10 @@ public class DefaultSchemaLight extends Light { if (channelConfiguration.brightnessStateTopic != null || channelConfiguration.brightnessCommandTopic != null) { localBrightnessChannel = brightnessChannel = buildChannel(BRIGHTNESS_CHANNEL_ID, brightnessValue, "Brightness", this) - .stateTopic(channelConfiguration.brightnessStateTopic, - channelConfiguration.brightnessValueTemplate) - .commandTopic(channelConfiguration.brightnessCommandTopic, channelConfiguration.isRetain(), - channelConfiguration.getQos()) - .withFormat("%.0f").commandFilter(this::handleBrightnessCommand).build(false); + .stateTopic(channelConfiguration.brightnessStateTopic, channelConfiguration.brightnessValueTemplate) + .commandTopic(channelConfiguration.brightnessCommandTopic, channelConfiguration.isRetain(), + channelConfiguration.getQos()) + .withFormat("%.0f").commandFilter(this::handleBrightnessCommand).build(false); } if (channelConfiguration.whiteCommandTopic != null) { @@ -111,10 +110,10 @@ public class DefaultSchemaLight extends Light { hasColorChannel = true; hiddenChannels.add(rgbChannel = buildChannel(RGB_CHANNEL_ID, new ColorValue(ColorMode.RGB, null, null, 100), "RGB state", this) - .stateTopic(channelConfiguration.rgbStateTopic, channelConfiguration.rgbValueTemplate) - .commandTopic(channelConfiguration.rgbCommandTopic, channelConfiguration.isRetain(), - channelConfiguration.getQos()) - .build(false)); + .stateTopic(channelConfiguration.rgbStateTopic, channelConfiguration.rgbValueTemplate) + .commandTopic(channelConfiguration.rgbCommandTopic, channelConfiguration.isRetain(), + channelConfiguration.getQos()) + .build(false)); } if (channelConfiguration.rgbwStateTopic != null || channelConfiguration.rgbwCommandTopic != null) { @@ -140,9 +139,9 @@ public class DefaultSchemaLight extends Light { hiddenChannels.add( xyChannel = buildChannel(XY_CHANNEL_ID, new ColorValue(ColorMode.XYY, null, null, 100), "XY State", this).stateTopic(channelConfiguration.xyStateTopic, channelConfiguration.xyValueTemplate) - .commandTopic(channelConfiguration.xyCommandTopic, channelConfiguration.isRetain(), - channelConfiguration.getQos()) - .build(false)); + .commandTopic(channelConfiguration.xyCommandTopic, channelConfiguration.isRetain(), + channelConfiguration.getQos()) + .build(false)); } if (channelConfiguration.hsStateTopic != null || channelConfiguration.hsCommandTopic != null) { diff --git a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/DeviceTrigger.java b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/DeviceTrigger.java index 43819119878..a0da3587175 100644 --- a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/DeviceTrigger.java +++ b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/DeviceTrigger.java @@ -67,7 +67,6 @@ public class DeviceTrigger extends AbstractComponent { OnOffValue value = new OnOffValue(channelConfiguration.payloadOn, channelConfiguration.payloadOff); buildChannel(SWITCH_CHANNEL_ID, value, channelConfiguration.getName(), componentConfiguration.getUpdateListener()) - .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate()) - .commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(), - channelConfiguration.getQos(), channelConfiguration.commandTemplate) - .build(); + .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate()) + .commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(), + channelConfiguration.getQos(), channelConfiguration.commandTemplate) + .build(); } } diff --git a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/Lock.java b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/Lock.java index 8128df50827..b50974a412a 100644 --- a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/Lock.java +++ b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/Lock.java @@ -60,9 +60,9 @@ public class Lock extends AbstractComponent { buildChannel(SWITCH_CHANNEL_ID, new OnOffValue(channelConfiguration.payloadLock, channelConfiguration.payloadUnlock), channelConfiguration.getName(), componentConfiguration.getUpdateListener()) - .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate()) - .commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(), - channelConfiguration.getQos()) - .build(); + .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate()) + .commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(), + channelConfiguration.getQos()) + .build(); } } diff --git a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/Number.java b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/Number.java index a012796c7fa..947f46cc41a 100644 --- a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/Number.java +++ b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/Number.java @@ -84,9 +84,9 @@ public class Number extends AbstractComponent { buildChannel(NUMBER_CHANNEL_ID, value, channelConfiguration.getName(), componentConfiguration.getUpdateListener()) - .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate()) - .commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(), - channelConfiguration.getQos(), channelConfiguration.commandTemplate) - .build(); + .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate()) + .commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(), + channelConfiguration.getQos(), channelConfiguration.commandTemplate) + .build(); } } diff --git a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/Select.java b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/Select.java index 174278977a8..9ead86ef8af 100644 --- a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/Select.java +++ b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/Select.java @@ -68,9 +68,9 @@ public class Select extends AbstractComponent { buildChannel(SELECT_CHANNEL_ID, value, channelConfiguration.getName(), componentConfiguration.getUpdateListener()) - .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate()) - .commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(), - channelConfiguration.getQos(), channelConfiguration.commandTemplate) - .build(); + .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate()) + .commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(), + channelConfiguration.getQos(), channelConfiguration.commandTemplate) + .build(); } } diff --git a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/Sensor.java b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/Sensor.java index b7a1d1ef372..f9f8706b5b1 100644 --- a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/Sensor.java +++ b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/Sensor.java @@ -90,8 +90,8 @@ public class Sensor extends AbstractComponent { buildChannel(SENSOR_CHANNEL_ID, value, channelConfiguration.getName(), getListener(componentConfiguration, value)) - .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())// - .trigger(trigger).build(); + .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())// + .trigger(trigger).build(); } private ChannelStateUpdateListener getListener(ComponentFactory.ComponentConfiguration componentConfiguration, diff --git a/bundles/org.openhab.binding.onewire/src/main/java/org/openhab/binding/onewire/internal/handler/AdvancedMultisensorThingHandler.java b/bundles/org.openhab.binding.onewire/src/main/java/org/openhab/binding/onewire/internal/handler/AdvancedMultisensorThingHandler.java index f6b571a74c2..cd0c05229a5 100644 --- a/bundles/org.openhab.binding.onewire/src/main/java/org/openhab/binding/onewire/internal/handler/AdvancedMultisensorThingHandler.java +++ b/bundles/org.openhab.binding.onewire/src/main/java/org/openhab/binding/onewire/internal/handler/AdvancedMultisensorThingHandler.java @@ -227,8 +227,8 @@ public class AdvancedMultisensorThingHandler extends OwBaseThingHandler { properties.put(PROPERTY_DS2438, ds2438configuration.getAssociatedSensorIds(OwSensorType.MS_TV).get(0).getFullPath()); } - default -> throw new OwException( - "sensorType " + sensorType.toString() + " not supported by this thing handler"); + default -> + throw new OwException("sensorType " + sensorType.toString() + " not supported by this thing handler"); } updateProperties(properties); diff --git a/bundles/org.openhab.binding.pilight/src/main/java/org/openhab/binding/pilight/internal/PilightConnector.java b/bundles/org.openhab.binding.pilight/src/main/java/org/openhab/binding/pilight/internal/PilightConnector.java index baf247b546d..b02deee8b69 100644 --- a/bundles/org.openhab.binding.pilight/src/main/java/org/openhab/binding/pilight/internal/PilightConnector.java +++ b/bundles/org.openhab.binding.pilight/src/main/java/org/openhab/binding/pilight/internal/PilightConnector.java @@ -69,7 +69,7 @@ public class PilightConnector implements Runnable, Closeable { private final ObjectMapper outputMapper = new ObjectMapper( new MappingJsonFactory().configure(JsonParser.Feature.AUTO_CLOSE_SOURCE, false)) - .setDefaultPropertyInclusion(JsonInclude.Include.NON_NULL); + .setDefaultPropertyInclusion(JsonInclude.Include.NON_NULL); private @Nullable Socket socket; private @Nullable PrintStream printStream; diff --git a/bundles/org.openhab.binding.powermax/src/main/java/org/openhab/binding/powermax/internal/console/PowermaxCommandExtension.java b/bundles/org.openhab.binding.powermax/src/main/java/org/openhab/binding/powermax/internal/console/PowermaxCommandExtension.java index 92f413f9af5..0cd9543676f 100644 --- a/bundles/org.openhab.binding.powermax/src/main/java/org/openhab/binding/powermax/internal/console/PowermaxCommandExtension.java +++ b/bundles/org.openhab.binding.powermax/src/main/java/org/openhab/binding/powermax/internal/console/PowermaxCommandExtension.java @@ -126,8 +126,8 @@ public class PowermaxCommandExtension extends AbstractConsoleCommandExtension im return new StringsCompleter(thingRegistry.getAll().stream() .filter(t -> PowermaxBindingConstants.BRIDGE_TYPE_SERIAL.equals(t.getThingTypeUID()) || PowermaxBindingConstants.BRIDGE_TYPE_IP.equals(t.getThingTypeUID())) - .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true).complete(args, - cursorArgumentIndex, cursorPosition, candidates); + .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true) + .complete(args, cursorArgumentIndex, cursorPosition, candidates); } else if (cursorArgumentIndex == 1) { Thing thing = getThing(args[0]); if (thing != null && (PowermaxBindingConstants.BRIDGE_TYPE_SERIAL.equals(thing.getThingTypeUID()) diff --git a/bundles/org.openhab.binding.smartmeter/src/test/java/org/openhab/binding/smartmeter/TestMeterReading.java b/bundles/org.openhab.binding.smartmeter/src/test/java/org/openhab/binding/smartmeter/TestMeterReading.java index c80acdc8f8c..1cd06d4ef4f 100644 --- a/bundles/org.openhab.binding.smartmeter/src/test/java/org/openhab/binding/smartmeter/TestMeterReading.java +++ b/bundles/org.openhab.binding.smartmeter/src/test/java/org/openhab/binding/smartmeter/TestMeterReading.java @@ -77,7 +77,7 @@ public class TestMeterReading { try { verify(changeListener, after( period.toMillis() + 2 * period.toMillis() * ConnectorBase.NUMBER_OF_RETRIES + period.toMillis() / 2) - .times(1)).errorOccurred(any()); + .times(1)).errorOccurred(any()); verify(connector, times(ConnectorBase.NUMBER_OF_RETRIES)).retryHook(ArgumentMatchers.anyInt()); } finally { disposable.dispose(); diff --git a/bundles/org.openhab.binding.somfytahoma/src/main/java/org/openhab/binding/somfytahoma/internal/console/SomfyTahomaCommandExtension.java b/bundles/org.openhab.binding.somfytahoma/src/main/java/org/openhab/binding/somfytahoma/internal/console/SomfyTahomaCommandExtension.java index b9ed380f883..33f26a65d67 100644 --- a/bundles/org.openhab.binding.somfytahoma/src/main/java/org/openhab/binding/somfytahoma/internal/console/SomfyTahomaCommandExtension.java +++ b/bundles/org.openhab.binding.somfytahoma/src/main/java/org/openhab/binding/somfytahoma/internal/console/SomfyTahomaCommandExtension.java @@ -103,8 +103,8 @@ public class SomfyTahomaCommandExtension extends AbstractConsoleCommandExtension if (cursorArgumentIndex <= 0) { return new StringsCompleter(thingRegistry.getAll().stream() .filter(t -> SomfyTahomaBindingConstants.THING_TYPE_BRIDGE.equals(t.getThingTypeUID())) - .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true).complete(args, - cursorArgumentIndex, cursorPosition, candidates); + .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true) + .complete(args, cursorArgumentIndex, cursorPosition, candidates); } else if (cursorArgumentIndex == 1) { Thing thing = getThing(args[0]); if (thing != null && SomfyTahomaBindingConstants.THING_TYPE_BRIDGE.equals(thing.getThingTypeUID())) { diff --git a/bundles/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/internal/bridge/slip/SCrunProductCommand.java b/bundles/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/internal/bridge/slip/SCrunProductCommand.java index 31ab49f028f..ef63483a16f 100644 --- a/bundles/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/internal/bridge/slip/SCrunProductCommand.java +++ b/bundles/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/internal/bridge/slip/SCrunProductCommand.java @@ -355,7 +355,7 @@ public class SCrunProductCommand extends RunProductCommand implements SlipBridge // create notification product that clones the new command positions product = new VeluxProduct(VeluxProductName.UNKNOWN, new ProductBridgeIndex(reqIndexArray01), ProductState.EXECUTING.value, setMainParameter, setMainParameter, reqFunctionalParameters, COMMAND) - .overrideDataSource(DataSource.BINDING); + .overrideDataSource(DataSource.BINDING); return true; } diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitHeaterCoolerImpl.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitHeaterCoolerImpl.java index 44aa202dfb2..629e816f567 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitHeaterCoolerImpl.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitHeaterCoolerImpl.java @@ -110,7 +110,7 @@ public class HomekitHeaterCoolerImpl extends AbstractHomekitAccessoryImpl implem : getAccessoryConfiguration(HomekitCharacteristicType.CURRENT_TEMPERATURE, HomekitTaggedItem.MIN_VALUE, BigDecimal.valueOf(HomekitCharacteristicFactory .convertFromCelsius(CurrentTemperatureCharacteristic.DEFAULT_MIN_VALUE))) - .doubleValue()); + .doubleValue()); } @Override diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitTemperatureSensorImpl.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitTemperatureSensorImpl.java index 2012ca6a024..f6c1dd5c71c 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitTemperatureSensorImpl.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitTemperatureSensorImpl.java @@ -61,7 +61,7 @@ class HomekitTemperatureSensorImpl extends AbstractHomekitAccessoryImpl implemen getAccessoryConfiguration(HomekitCharacteristicType.CURRENT_TEMPERATURE, HomekitTaggedItem.MIN_VALUE, BigDecimal.valueOf(HomekitCharacteristicFactory .convertFromCelsius(CurrentTemperatureCharacteristic.DEFAULT_MIN_VALUE))) - .doubleValue()); + .doubleValue()); } @Override @@ -70,7 +70,7 @@ class HomekitTemperatureSensorImpl extends AbstractHomekitAccessoryImpl implemen getAccessoryConfiguration(HomekitCharacteristicType.CURRENT_TEMPERATURE, HomekitTaggedItem.MAX_VALUE, BigDecimal.valueOf(HomekitCharacteristicFactory .convertFromCelsius(CurrentTemperatureCharacteristic.DEFAULT_MAX_VALUE))) - .doubleValue()); + .doubleValue()); } @Override diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitThermostatImpl.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitThermostatImpl.java index ca945a8ecd4..8f196e8c9de 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitThermostatImpl.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitThermostatImpl.java @@ -120,7 +120,7 @@ class HomekitThermostatImpl extends AbstractHomekitAccessoryImpl implements Ther getAccessoryConfiguration(HomekitCharacteristicType.CURRENT_TEMPERATURE, HomekitTaggedItem.MIN_VALUE, BigDecimal.valueOf(HomekitCharacteristicFactory .convertFromCelsius(CurrentTemperatureCharacteristic.DEFAULT_MIN_VALUE))) - .doubleValue()); + .doubleValue()); } @Override @@ -129,7 +129,7 @@ class HomekitThermostatImpl extends AbstractHomekitAccessoryImpl implements Ther getAccessoryConfiguration(HomekitCharacteristicType.CURRENT_TEMPERATURE, HomekitTaggedItem.MAX_VALUE, BigDecimal.valueOf(HomekitCharacteristicFactory .convertFromCelsius(CurrentTemperatureCharacteristic.DEFAULT_MAX_VALUE))) - .doubleValue()); + .doubleValue()); } @Override @@ -189,7 +189,7 @@ class HomekitThermostatImpl extends AbstractHomekitAccessoryImpl implements Ther HomekitTaggedItem.MIN_VALUE, BigDecimal.valueOf(HomekitCharacteristicFactory .convertFromCelsius(TargetTemperatureCharacteristic.DEFAULT_MIN_VALUE))) - .doubleValue()); + .doubleValue()); } @Override @@ -200,7 +200,7 @@ class HomekitThermostatImpl extends AbstractHomekitAccessoryImpl implements Ther HomekitTaggedItem.MAX_VALUE, BigDecimal.valueOf(HomekitCharacteristicFactory .convertFromCelsius(TargetTemperatureCharacteristic.DEFAULT_MAX_VALUE))) - .doubleValue()); + .doubleValue()); } @Override diff --git a/bundles/org.openhab.persistence.dynamodb/src/main/java/org/openhab/persistence/dynamodb/internal/DynamoDBBigDecimalItem.java b/bundles/org.openhab.persistence.dynamodb/src/main/java/org/openhab/persistence/dynamodb/internal/DynamoDBBigDecimalItem.java index 54c77a0f262..1adddbe4729 100644 --- a/bundles/org.openhab.persistence.dynamodb/src/main/java/org/openhab/persistence/dynamodb/internal/DynamoDBBigDecimalItem.java +++ b/bundles/org.openhab.persistence.dynamodb/src/main/java/org/openhab/persistence/dynamodb/internal/DynamoDBBigDecimalItem.java @@ -33,19 +33,19 @@ public class DynamoDBBigDecimalItem extends AbstractDynamoDBItem { public static StaticTableSchema TABLE_SCHEMA_LEGACY = getBaseSchemaBuilder( DynamoDBBigDecimalItem.class, true).newItemSupplier(DynamoDBBigDecimalItem::new) - .addAttribute(NULLABLE_BIGDECIMAL, a -> a.name(ATTRIBUTE_NAME_ITEMSTATE_LEGACY) - .getter(DynamoDBBigDecimalItem::getState).setter(DynamoDBBigDecimalItem::setState)) - .build(); + .addAttribute(NULLABLE_BIGDECIMAL, a -> a.name(ATTRIBUTE_NAME_ITEMSTATE_LEGACY) + .getter(DynamoDBBigDecimalItem::getState).setter(DynamoDBBigDecimalItem::setState)) + .build(); public static StaticTableSchema TABLE_SCHEMA_NEW = getBaseSchemaBuilder( DynamoDBBigDecimalItem.class, false) - .newItemSupplier(DynamoDBBigDecimalItem::new) - .addAttribute(NULLABLE_BIGDECIMAL, - a -> a.name(ATTRIBUTE_NAME_ITEMSTATE_NUMBER).getter(DynamoDBBigDecimalItem::getState) - .setter(DynamoDBBigDecimalItem::setState)) - .addAttribute(NULLABLE_LONG, a -> a.name(ATTRIBUTE_NAME_EXPIRY) - .getter(AbstractDynamoDBItem::getExpiryDate).setter(AbstractDynamoDBItem::setExpiry)) - .build(); + .newItemSupplier(DynamoDBBigDecimalItem::new) + .addAttribute(NULLABLE_BIGDECIMAL, + a -> a.name(ATTRIBUTE_NAME_ITEMSTATE_NUMBER).getter(DynamoDBBigDecimalItem::getState) + .setter(DynamoDBBigDecimalItem::setState)) + .addAttribute(NULLABLE_LONG, a -> a.name(ATTRIBUTE_NAME_EXPIRY).getter(AbstractDynamoDBItem::getExpiryDate) + .setter(AbstractDynamoDBItem::setExpiry)) + .build(); /** * We get the following error if the BigDecimal has too many digits diff --git a/bundles/org.openhab.persistence.dynamodb/src/main/java/org/openhab/persistence/dynamodb/internal/DynamoDBStringItem.java b/bundles/org.openhab.persistence.dynamodb/src/main/java/org/openhab/persistence/dynamodb/internal/DynamoDBStringItem.java index 90ae5d1f637..e905d45fa61 100644 --- a/bundles/org.openhab.persistence.dynamodb/src/main/java/org/openhab/persistence/dynamodb/internal/DynamoDBStringItem.java +++ b/bundles/org.openhab.persistence.dynamodb/src/main/java/org/openhab/persistence/dynamodb/internal/DynamoDBStringItem.java @@ -30,22 +30,20 @@ public class DynamoDBStringItem extends AbstractDynamoDBItem { private static Class<@Nullable String> NULLABLE_STRING = (Class<@Nullable String>) String.class; public static final StaticTableSchema TABLE_SCHEMA_LEGACY = getBaseSchemaBuilder( - DynamoDBStringItem.class, true) - .newItemSupplier( - DynamoDBStringItem::new) - .addAttribute(NULLABLE_STRING, a -> a.name(DynamoDBItem.ATTRIBUTE_NAME_ITEMSTATE_LEGACY) - .getter(DynamoDBStringItem::getState).setter(DynamoDBStringItem::setState)) - .build(); + DynamoDBStringItem.class, true).newItemSupplier(DynamoDBStringItem::new) + .addAttribute(NULLABLE_STRING, a -> a.name(DynamoDBItem.ATTRIBUTE_NAME_ITEMSTATE_LEGACY) + .getter(DynamoDBStringItem::getState).setter(DynamoDBStringItem::setState)) + .build(); public static final StaticTableSchema TABLE_SCHEMA_NEW = getBaseSchemaBuilder( DynamoDBStringItem.class, false) - .newItemSupplier(DynamoDBStringItem::new) - .addAttribute(NULLABLE_STRING, - a -> a.name(DynamoDBItem.ATTRIBUTE_NAME_ITEMSTATE_STRING) - .getter(DynamoDBStringItem::getState).setter(DynamoDBStringItem::setState)) - .addAttribute(NULLABLE_LONG, a -> a.name(ATTRIBUTE_NAME_EXPIRY) - .getter(AbstractDynamoDBItem::getExpiryDate).setter(AbstractDynamoDBItem::setExpiry)) - .build(); + .newItemSupplier(DynamoDBStringItem::new) + .addAttribute(NULLABLE_STRING, + a -> a.name(DynamoDBItem.ATTRIBUTE_NAME_ITEMSTATE_STRING).getter(DynamoDBStringItem::getState) + .setter(DynamoDBStringItem::setState)) + .addAttribute(NULLABLE_LONG, a -> a.name(ATTRIBUTE_NAME_EXPIRY).getter(AbstractDynamoDBItem::getExpiryDate) + .setter(AbstractDynamoDBItem::setExpiry)) + .build(); public DynamoDBStringItem() { this("", null, ZonedDateTime.now(), null); diff --git a/bundles/org.openhab.transform.bin2json/src/main/java/org/openhab/transform/bin2json/internal/Bin2Json.java b/bundles/org.openhab.transform.bin2json/src/main/java/org/openhab/transform/bin2json/internal/Bin2Json.java index 1f064e6a2de..a884f8367dd 100644 --- a/bundles/org.openhab.transform.bin2json/src/main/java/org/openhab/transform/bin2json/internal/Bin2Json.java +++ b/bundles/org.openhab.transform.bin2json/src/main/java/org/openhab/transform/bin2json/internal/Bin2Json.java @@ -63,7 +63,7 @@ import com.igormaznitsa.jbbp.model.JBBPFieldUShort; *
  * {@code
  * JsonObject json = new Bin2Json("byte a; byte b; ubyte c;").convert("03FAFF");
- * json.toString() = {"a":3,"b":-6,"c":255}
+ * json.toString() = {"a":3,"b":-6,"c":255}}
  * 
* * @author Pauli Anttila - Initial contribution diff --git a/itests/org.openhab.binding.mielecloud.tests/src/main/java/org/openhab/binding/mielecloud/internal/handler/AbstractMieleThingHandlerTest.java b/itests/org.openhab.binding.mielecloud.tests/src/main/java/org/openhab/binding/mielecloud/internal/handler/AbstractMieleThingHandlerTest.java index 4939c156ea7..7ed43b57253 100644 --- a/itests/org.openhab.binding.mielecloud.tests/src/main/java/org/openhab/binding/mielecloud/internal/handler/AbstractMieleThingHandlerTest.java +++ b/itests/org.openhab.binding.mielecloud.tests/src/main/java/org/openhab/binding/mielecloud/internal/handler/AbstractMieleThingHandlerTest.java @@ -170,7 +170,7 @@ public abstract class AbstractMieleThingHandlerTest extends JavaOSGiTest { OAuthFactory oAuthFactory = mock(OAuthFactory.class); when(oAuthFactory .getOAuthClientService(MieleCloudBindingIntegrationTestConstants.BRIDGE_THING_UID.getAsString())) - .thenReturn(oAuthClientService); + .thenReturn(oAuthClientService); OpenHabOAuthTokenRefresher tokenRefresher = getService(OAuthTokenRefresher.class, OpenHabOAuthTokenRefresher.class); diff --git a/pom.xml b/pom.xml index f8c92ff4a48..a775701d7f9 100644 --- a/pom.xml +++ b/pom.xml @@ -77,8 +77,9 @@ 4.1.72.Final 3.14.9 0.13.0 - 2.28.0 - 4.21.0 + 2.35.0 + 4.26 + 4.21.0 @@ -521,7 +522,7 @@ Import-Package: \\ openhab_wst_xml_files.prefs - ${spotless.eclipse.version} + ${spotless.eclipse.wtp.version} @@ -536,7 +537,7 @@ Import-Package: \\ openhab_wst_feature_file.prefs - ${spotless.eclipse.version} + ${spotless.eclipse.wtp.version} @@ -551,7 +552,7 @@ Import-Package: \\ openhab_wst_pom_file.prefs - ${spotless.eclipse.version} + ${spotless.eclipse.wtp.version}