]> git.basschouten.com Git - openhab-addons.git/commitdiff
Reduce SAT warnings (#17406)
authorHolger Friedrich <mail@holger-friedrich.de>
Fri, 13 Sep 2024 15:20:11 +0000 (17:20 +0200)
committerGitHub <noreply@github.com>
Fri, 13 Sep 2024 15:20:11 +0000 (17:20 +0200)
* Reduce SAT warnings

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
107 files changed:
bundles/org.openhab.automation.jrubyscripting/src/main/resources/OH-INF/config/config.xml
bundles/org.openhab.binding.airgradient/src/main/java/org/openhab/binding/airgradient/internal/handler/DynamicChannelHelper.java
bundles/org.openhab.binding.astro/src/main/java/org/openhab/binding/astro/internal/handler/SunHandler.java
bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/handler/AwattarBridgeHandler.java
bundles/org.openhab.binding.awattar/src/test/java/org/openhab/binding/awattar/internal/handler/AwattarBridgeHandlerRefreshTest.java
bundles/org.openhab.binding.awattar/src/test/java/org/openhab/binding/awattar/internal/handler/AwattarBridgeHandlerTest.java
bundles/org.openhab.binding.bluetooth.airthings/src/main/java/org/openhab/binding/bluetooth/airthings/internal/AirthingsWaveGen1Handler.java
bundles/org.openhab.binding.bluetooth.daikinmadoka/src/main/java/org/openhab/binding/bluetooth/daikinmadoka/internal/model/MadokaValue.java
bundles/org.openhab.binding.bluetooth.generic/src/main/java/org/openhab/binding/bluetooth/generic/internal/BluetoothChannelUtils.java
bundles/org.openhab.binding.bluetooth.generic/src/main/java/org/openhab/binding/bluetooth/generic/internal/CharacteristicChannelTypeProvider.java
bundles/org.openhab.binding.cm11a/src/main/java/org/openhab/binding/cm11a/internal/X10Interface.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/discovery/SceneDiscoveryService.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/handler/CircuitHandler.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/serverconnection/constants/JSONApiResponseKeysEnum.java
bundles/org.openhab.binding.draytonwiser/src/main/java/org/openhab/binding/draytonwiser/internal/handler/ControllerHandler.java
bundles/org.openhab.binding.draytonwiser/src/main/java/org/openhab/binding/draytonwiser/internal/handler/HotWaterHandler.java
bundles/org.openhab.binding.easee/src/main/java/org/openhab/binding/easee/internal/model/GenericResponseTransformer.java
bundles/org.openhab.binding.emotiva/src/main/java/org/openhab/binding/emotiva/internal/EmotivaProcessorHandler.java
bundles/org.openhab.binding.enocean/src/main/resources/OH-INF/thing/channels.xml
bundles/org.openhab.binding.enphase/src/main/java/org/openhab/binding/enphase/internal/handler/EnvoyEntrezConnector.java
bundles/org.openhab.binding.freeboxos/src/main/resources/OH-INF/config/bridge-config.xml
bundles/org.openhab.binding.fsinternetradio/src/main/java/org/openhab/binding/fsinternetradio/internal/radio/FrontierSiliconRadio.java
bundles/org.openhab.binding.fsinternetradio/src/main/java/org/openhab/binding/fsinternetradio/internal/radio/FrontierSiliconRadioApiResult.java
bundles/org.openhab.binding.fsinternetradio/src/main/java/org/openhab/binding/fsinternetradio/internal/radio/FrontierSiliconRadioConnection.java
bundles/org.openhab.binding.fsinternetradio/src/main/java/org/openhab/binding/fsinternetradio/internal/radio/FrontierSiliconRadioConstants.java
bundles/org.openhab.binding.groupepsa/src/main/java/org/openhab/binding/groupepsa/internal/things/GroupePSAHandler.java
bundles/org.openhab.binding.growatt/src/main/java/org/openhab/binding/growatt/internal/cloud/GrowattCloud.java
bundles/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/common/AuthenticationHandler.java
bundles/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/discovery/HomematicDeviceDiscoveryService.java
bundles/org.openhab.binding.homewizard/src/main/java/org/openhab/binding/homewizard/internal/HomeWizardDeviceHandler.java
bundles/org.openhab.binding.homewizard/src/main/java/org/openhab/binding/homewizard/internal/HomeWizardStatefulDeviceHandler.java
bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/handler/Clip2BridgeHandler.java
bundles/org.openhab.binding.icloud/src/main/java/org/openhab/binding/icloud/internal/handler/ICloudDeviceHandler.java
bundles/org.openhab.binding.ihc/src/main/java/org/openhab/binding/ihc/internal/profiles/PushButtonToCommandProfile.java
bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/driver/Port.java
bundles/org.openhab.binding.kostalinverter/src/main/resources/OH-INF/thing/Channels.xml
bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/cloud/CloudConnector.java
bundles/org.openhab.binding.modbus/src/main/java/org/openhab/binding/modbus/internal/handler/ModbusDataThingHandler.java
bundles/org.openhab.binding.modbus/src/main/java/org/openhab/binding/modbus/internal/profiles/ModbusGainOffsetProfile.java
bundles/org.openhab.binding.modbus/src/main/resources/OH-INF/thing/thing-data.xml
bundles/org.openhab.binding.mqtt.espmilighthub/src/main/resources/OH-INF/config/config.xml
bundles/org.openhab.binding.mqtt.generic/src/main/java/org/openhab/binding/mqtt/generic/ChannelState.java
bundles/org.openhab.binding.mqtt.homeassistant/src/main/resources/OH-INF/config/config.xml
bundles/org.openhab.binding.mqtt.ruuvigateway/src/main/java/org/openhab/binding/mqtt/ruuvigateway/internal/parser/GatewayPayloadParser.java
bundles/org.openhab.binding.mybmw/src/main/java/org/openhab/binding/mybmw/internal/handler/auth/MyBMWTokenController.java
bundles/org.openhab.binding.nikobus/src/main/java/org/openhab/binding/nikobus/internal/utils/Utils.java
bundles/org.openhab.binding.nzwateralerts/src/main/java/org/openhab/binding/nzwateralerts/internal/api/NapierCityCouncil.java
bundles/org.openhab.binding.opensprinkler/src/main/java/org/openhab/binding/opensprinkler/internal/api/OpenSprinklerHttpApiV100.java
bundles/org.openhab.binding.phc/src/main/java/org/openhab/binding/phc/internal/handler/PHCHandler.java
bundles/org.openhab.binding.pilight/src/main/java/org/openhab/binding/pilight/internal/PilightConnector.java
bundles/org.openhab.binding.pioneeravr/src/main/java/org/openhab/binding/pioneeravr/internal/protocol/serial/SerialAvrConnection.java
bundles/org.openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/QbusBridgeHandler.java
bundles/org.openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/protocol/QbusCommunication.java
bundles/org.openhab.binding.rfxcom/src/main/java/org/openhab/binding/rfxcom/internal/messages/RFXComEnergyMessage.java
bundles/org.openhab.binding.rfxcom/src/main/java/org/openhab/binding/rfxcom/internal/messages/RFXComInterfaceControlMessage.java
bundles/org.openhab.binding.rfxcom/src/main/java/org/openhab/binding/rfxcom/internal/messages/RFXComLighting1Message.java
bundles/org.openhab.binding.rfxcom/src/main/java/org/openhab/binding/rfxcom/internal/messages/RFXComLighting5Message.java
bundles/org.openhab.binding.rfxcom/src/main/java/org/openhab/binding/rfxcom/internal/messages/RFXComRawMessage.java
bundles/org.openhab.binding.rfxcom/src/main/java/org/openhab/binding/rfxcom/internal/messages/RFXComSecurity1Message.java
bundles/org.openhab.binding.rfxcom/src/main/java/org/openhab/binding/rfxcom/internal/messages/RFXComUVMessage.java
bundles/org.openhab.binding.rfxcom/src/test/java/org/openhab/binding/rfxcom/internal/messages/RFXComRawMessageTest.java
bundles/org.openhab.binding.rme/src/main/java/org/openhab/binding/rme/internal/handler/SerialThingHandler.java
bundles/org.openhab.binding.salus/src/main/resources/OH-INF/thing/aws-salus-bridge.xml
bundles/org.openhab.binding.salus/src/main/resources/OH-INF/thing/salus-bridge.xml
bundles/org.openhab.binding.salus/src/main/resources/OH-INF/thing/thing-types.xml
bundles/org.openhab.binding.samsungtv/src/main/java/org/openhab/binding/samsungtv/internal/handler/SamsungTvHandler.java
bundles/org.openhab.binding.sensibo/src/test/java/org/openhab/binding/sensibo/internal/SensiboModelTest.java
bundles/org.openhab.binding.sensorcommunity/src/main/java/org/openhab/binding/sensorcommunity/internal/handler/HTTPHandler.java
bundles/org.openhab.binding.siemenshvac/src/main/java/org/openhab/binding/siemenshvac/internal/converter/type/TimeOfDayTypeConverter.java
bundles/org.openhab.binding.siemenshvac/src/main/java/org/openhab/binding/siemenshvac/internal/handler/SiemensHvacBridgeThingHandler.java
bundles/org.openhab.binding.siemenshvac/src/main/java/org/openhab/binding/siemenshvac/internal/handler/SiemensHvacHandlerImpl.java
bundles/org.openhab.binding.siemenshvac/src/main/java/org/openhab/binding/siemenshvac/internal/metadata/SiemensHvacMetadataDataPoint.java
bundles/org.openhab.binding.siemenshvac/src/main/java/org/openhab/binding/siemenshvac/internal/metadata/SiemensHvacMetadataRegistryImpl.java
bundles/org.openhab.binding.siemenshvac/src/main/java/org/openhab/binding/siemenshvac/internal/network/SiemensHvacConnectorImpl.java
bundles/org.openhab.binding.siemenshvac/src/main/java/org/openhab/binding/siemenshvac/internal/network/SiemensHvacRequestListener.java
bundles/org.openhab.binding.solarmax/src/main/java/org/openhab/binding/solarmax/internal/SolarMaxHandler.java
bundles/org.openhab.binding.somfytahoma/src/main/resources/OH-INF/thing/channels.xml
bundles/org.openhab.binding.sonyprojector/src/main/java/org/openhab/binding/sonyprojector/internal/discovery/SonyProjectorDiscoveryParticipant.java
bundles/org.openhab.binding.synopanalyzer/src/main/java/org/openhab/binding/synopanalyzer/internal/synop/SynopLand.java
bundles/org.openhab.binding.synopanalyzer/src/main/java/org/openhab/binding/synopanalyzer/internal/synop/WindDirections.java
bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/coe/TACmiCoEBridgeHandler.java
bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/message/AnalogValue.java
bundles/org.openhab.binding.tado/src/main/java/org/openhab/binding/tado/swagger/codegen/api/client/HomeApi.java
bundles/org.openhab.binding.teleinfo/README.md
bundles/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/internal/VeluxBinding.java
bundles/org.openhab.binding.vigicrues/src/main/java/org/openhab/binding/vigicrues/internal/handler/VigiCruesHandler.java
bundles/org.openhab.binding.webthing/src/main/java/org/openhab/binding/webthing/internal/client/DescriptionLoader.java
bundles/org.openhab.binding.wifiled/src/main/java/org/openhab/binding/wifiled/internal/handler/AbstractWiFiLEDDriver.java
bundles/org.openhab.binding.wifiled/src/main/java/org/openhab/binding/wifiled/internal/handler/ClassicWiFiLEDDriver.java
bundles/org.openhab.binding.wifiled/src/main/java/org/openhab/binding/wifiled/internal/handler/FadingWiFiLEDDriver.java
bundles/org.openhab.binding.wifiled/src/main/java/org/openhab/binding/wifiled/internal/handler/WiFiLEDHandler.java
bundles/org.openhab.binding.wifiled/src/test/java/org/openhab/binding/wifiled/internal/handler/LEDStateDTOTest.java
bundles/org.openhab.binding.yamahareceiver/src/main/java/org/openhab/binding/yamahareceiver/internal/protocol/xml/DeviceInformationXML.java
bundles/org.openhab.binding.yamahareceiver/src/main/java/org/openhab/binding/yamahareceiver/internal/protocol/xml/InputWithTunerDABControlXML.java
bundles/org.openhab.binding.yamahareceiver/src/main/java/org/openhab/binding/yamahareceiver/internal/protocol/xml/XMLConnection.java
bundles/org.openhab.binding.yamahareceiver/src/main/java/org/openhab/binding/yamahareceiver/internal/protocol/xml/ZoneControlXML.java
bundles/org.openhab.binding.yamahareceiver/src/main/java/org/openhab/binding/yamahareceiver/internal/state/DabBandState.java
bundles/org.openhab.binding.yamahareceiver/src/main/java/org/openhab/binding/yamahareceiver/internal/state/DabBandStateListener.java
bundles/org.openhab.binding.yamahareceiver/src/main/java/org/openhab/binding/yamahareceiver/internal/state/Invalidateable.java
bundles/org.openhab.transform.basicprofiles/src/main/java/org/openhab/transform/basicprofiles/internal/profiles/StateFilterProfile.java
bundles/org.openhab.transform.basicprofiles/src/test/java/org/openhab/transform/basicprofiles/internal/profiles/StateFilterProfileTest.java
bundles/org.openhab.voice.googletts/src/main/java/org/openhab/voice/googletts/internal/GoogleTTSVoice.java
bundles/org.openhab.voice.mactts/src/main/java/org/openhab/voice/mactts/internal/MacTTSService.java
bundles/org.openhab.voice.marytts/src/main/java/org/openhab/voice/marytts/internal/MaryTTSVoice.java
bundles/org.openhab.voice.pollytts/src/main/java/org/openhab/voice/pollytts/internal/PollyTTSVoice.java
bundles/org.openhab.voice.voicerss/src/main/java/org/openhab/voice/voicerss/internal/VoiceRSSVoice.java
itests/org.openhab.binding.ntp.tests/src/main/java/org/openhab/binding/ntp/test/NtpOSGiTest.java

index cd8e4f8723e0b1139d62f86ced5b2376c9415d31..c35ee84520c4b27d187b7fbc8ef8351aa68a7dd1 100644 (file)
@@ -26,7 +26,7 @@
                <parameter name="gems" type="text" required="false" groupName="gems">
                        <label>Ruby Gems</label>
                        <description><![CDATA[A comma separated list of Ruby Gems to install. Versions may be constrained by separating with an
-                           <tt>=</tt> and then the standard RubyGems version constraint, such as "<tt>openhab-scripting=~>5.0</tt>".
+                               <tt>=</tt> and then the standard RubyGems version constraint, such as "<tt>openhab-scripting=~>5.0</tt>".
                                ]]></description>
                        <default>openhab-scripting=~>5.0.0</default>
                </parameter>
index 4fbd5f2b4f143315280f4d3b623a35698530bfe8..587e8f8c2851145aa3dc4cb5b167725f7f353cbc 100644 (file)
@@ -38,7 +38,7 @@ public class DynamicChannelHelper {
     private record ConfigurationChannel(String id, String typeId, String itemType) {
     }
 
-    private final static List<ConfigurationChannel> channels = new ArrayList<ConfigurationChannel>() {
+    private static final List<ConfigurationChannel> CHANNELS = new ArrayList<ConfigurationChannel>() {
         {
             add(new ConfigurationChannel(CHANNEL_COUNTRY_CODE, CHANNEL_COUNTRY_CODE, "String"));
             add(new ConfigurationChannel(CHANNEL_PM_STANDARD, CHANNEL_PM_STANDARD, "String"));
@@ -58,10 +58,10 @@ public class DynamicChannelHelper {
         }
     };
 
-    private final static Logger logger = LoggerFactory.getLogger(DynamicChannelHelper.class);
+    private static final Logger logger = LoggerFactory.getLogger(DynamicChannelHelper.class);
 
     public static ThingBuilder updateThingWithConfigurationChannels(Thing thing, ThingBuilder builder) {
-        for (ConfigurationChannel channel : channels) {
+        for (ConfigurationChannel channel : CHANNELS) {
             addLocalConfigurationChannel(thing, builder, channel);
         }
 
index 84b7a37d8bdbd709886f98dbd3f2bc23b62cc0c7..da3354d4675887b9468f2c692d12df067b69ca39 100644 (file)
@@ -21,7 +21,12 @@ import org.eclipse.jdt.annotation.Nullable;
 import org.openhab.binding.astro.internal.calc.SunCalc;
 import org.openhab.binding.astro.internal.job.DailyJobSun;
 import org.openhab.binding.astro.internal.job.Job;
-import org.openhab.binding.astro.internal.model.*;
+import org.openhab.binding.astro.internal.model.Planet;
+import org.openhab.binding.astro.internal.model.Position;
+import org.openhab.binding.astro.internal.model.Radiation;
+import org.openhab.binding.astro.internal.model.Range;
+import org.openhab.binding.astro.internal.model.Sun;
+import org.openhab.binding.astro.internal.model.SunPhaseName;
 import org.openhab.core.i18n.TimeZoneProvider;
 import org.openhab.core.scheduler.CronScheduler;
 import org.openhab.core.thing.Thing;
index b62909d740f26819600a9c9a77fd28765121d922..3eb991140189bb1abdd02a81c1ad25deaeb90f14 100644 (file)
@@ -207,7 +207,6 @@ public class AwattarBridgeHandler extends BaseBridgeHandler {
 
         // refresh then every 3 hours, if the last refresh was more than an hour ago
         if (now.getHour() % 3 == 0 && lastRefresh.getEpochSecond() < now.minusHours(1).toEpochSecond()) {
-
             // update the last refresh time
             lastRefresh = Instant.now();
 
index d7f67bda9897d8f341af1ace76ba29625d8d9769..879fc437e67f28f65ff6b6472824abd3601fd8c6 100644 (file)
@@ -73,7 +73,6 @@ class AwattarBridgeHandlerRefreshTest extends JavaTest {
 
     @BeforeEach
     public void setUp() throws IllegalArgumentException, IllegalAccessException {
-
         when(timeZoneProviderMock.getTimeZone()).thenReturn(ZoneId.of("GMT+2"));
 
         when(bridgeMock.getUID()).thenReturn(BRIDGE_UID);
index 5c1ce6c705e8cba0ce19767e0ba7f2dcf3fb621c..819174b2aef804c0451f760a5ad6c29152d796e9 100644 (file)
@@ -95,7 +95,6 @@ public class AwattarBridgeHandlerTest extends JavaTest {
 
     @BeforeEach
     public void setUp() throws IOException, IllegalArgumentException, IllegalAccessException, AwattarApiException {
-
         // mock the API response
         try (InputStream inputStream = AwattarBridgeHandlerTest.class.getResourceAsStream("api_response.json")) {
             SortedSet<AwattarPrice> result = new TreeSet<>(Comparator.comparing(AwattarPrice::timerange));
index 6123bcf3fe9e3bca8097f70edab3147448099f80..cffab0a3c5c37f47f184675c80eeb12588f0da60 100644 (file)
@@ -28,7 +28,7 @@ import org.slf4j.LoggerFactory;
  * The {@link AirthingsWaveGen1Handler} is responsible for handling commands, which are
  * sent to one of the channels.
  *
- * @author Davy Wong - Added Airthings Wave Gen 1 support
+ * @author Davy Wong - initial contribution, added Airthings Wave Gen 1 support
  */
 @NonNullByDefault
 public class AirthingsWaveGen1Handler extends AbstractAirthingsHandler {
index 7c161eb296174ee6e1469fc1cf346be23c2f6e89..47be517e4d66ec460e9b216c8e9bd23e8c450ced 100644 (file)
@@ -40,7 +40,7 @@ import org.slf4j.LoggerFactory;
 /**
  * The {@link BluetoothChannelUtils} contains utility functions used by the GattChannelHandler
  *
- * @author Vlad Kolotov - Original author
+ * @author Vlad Kolotov - Initial contribution
  * @author Connor Petty - Modified for openHAB use
  */
 @NonNullByDefault
@@ -75,11 +75,11 @@ public class BluetoothChannelUtils {
             case SINT:
             case FLOAT_IEE754:
             case FLOAT_IEE11073:
-                BluetoothUnit unit = BluetoothUnit.findByType(field.getUnit());
-                if (unit != null) {
-                    // TODO
-                    // return "Number:" + unit.getUnit().getDimension();
-                }
+                // BluetoothUnit unit = BluetoothUnit.findByType(field.getUnit());
+                // if (unit != null) {
+                // TODO
+                // return "Number:" + unit.getUnit().getDimension();
+                // }
                 return "Number";
             case UTF8S:
             case UTF16S:
@@ -208,7 +208,7 @@ public class BluetoothChannelUtils {
         if (decimalType != null) {
             try {
                 return field.getEnumeration(new BigInteger(decimalType.toString()));
-            } catch (NumberFormatException ex) {
+            } catch (NumberFormatException ignored) {
                 // do nothing
             }
         }
index dd20532b4d35cc5cdd825e49acbbbe6bd8c879de..ca53b0bb9b5e0566e3558972a832ef4113bbd88f 100644 (file)
@@ -42,7 +42,7 @@ import org.slf4j.LoggerFactory;
 /**
  * {@link CharacteristicChannelTypeProvider} that provides channel types for dynamically discovered characteristics.
  *
- * @author Vlad Kolotov - Original author
+ * @author Vlad Kolotov - Initial contribution
  * @author Connor Petty - Modified for openHAB use.
  */
 @NonNullByDefault
index d8130c0565f6b2671f34f3db34738464e80d17ac..4acc3951b19a2d215aa6d779d7741167ef803379 100644 (file)
@@ -47,7 +47,7 @@ import gnu.io.UnsupportedCommOperationException;
  * Driver for the CM11 X10 interface.
  *
  *
- * @author Anthony Green - Original code
+ * @author Anthony Green - Initial contribution
  * @author Bob Raker - updates to setClock code, adapted code for use in openHAB2
  * @see <a href="http://www.heyu.org/docs/protocol.txt">CM11 Protocol specification</a>
  * @see <a href="http://www.rxtx.org">RXTX Serial API for Java</a>
index 2f9f0e16453c6ee444007f0698bc1b0f9c948430..1f3c916960cd1ec3f7c0eebc4b5ed68699dde855 100644 (file)
@@ -113,7 +113,6 @@ public class SceneDiscoveryService extends AbstractDiscoveryService {
                             .withBridge(bridgeUID).withLabel(scene.getSceneName()).build();
 
                     thingDiscovered(discoveryResult);
-
                 } else {
                     logger.debug("discovered unsupported scene: name '{}' with id {}", scene.getSceneName(),
                             scene.getID());
index 0935228cf0e1aa21fb962be7c1e0945e17063524..acdc134c0de31acb64361780e33fa25001322721 100644 (file)
@@ -47,8 +47,8 @@ import org.slf4j.LoggerFactory;
  * For that it uses the {@link BridgeHandler} to register this class as a {@link DeviceStatusListener} to get informed
  * about changes from the accompanying {@link Circuit}.
  *
- * @author Michael Ochel
- * @author Matthias Siegele
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  */
 public class CircuitHandler extends BaseThingHandler implements DeviceStatusListener {
 
index b3ce104d06da7696d04f02b0b70c52b44be14264..159f917b8d9cf9b871abc84e0f2aeaf3ed457d1f 100644 (file)
@@ -16,8 +16,8 @@ package org.openhab.binding.digitalstrom.internal.lib.serverconnection.constants
  * The {@link JSONApiResponseKeysEnum} contains digitalSTROM-JSON response keys.
  *
  * @author Alexander Betker - Initial contribution
- * @author Michael Ochel completely changed and updated only methods remained
- * @author Matthias Siegele completely changed and updated only methods remained
+ * @author Michael Ochel completely changed and updated only methods remained
+ * @author Matthias Siegele completely changed and updated only methods remained
  */
 public enum JSONApiResponseKeysEnum {
 
index 6abf84e7f982937f83581af197bdf4a1b95e6cb8..86adfb39b88313ae8a18eac9d0f102e00a73a698 100644 (file)
@@ -112,7 +112,7 @@ public class ControllerHandler extends DraytonWiserThingHandler<ControllerData>
     }
 
     private State getHeatChannel1Demand() {
-        return getData().heatingChannels.size() >= 1
+        return !getData().heatingChannels.isEmpty()
                 ? new QuantityType<>(getData().heatingChannels.get(0).getPercentageDemand(), Units.PERCENT)
                 : UnDefType.UNDEF;
     }
@@ -124,7 +124,7 @@ public class ControllerHandler extends DraytonWiserThingHandler<ControllerData>
     }
 
     private State getHeatChannel1DemandState() {
-        return OnOffType.from(getData().heatingChannels.size() >= 1
+        return OnOffType.from(!getData().heatingChannels.isEmpty()
                 && "ON".equalsIgnoreCase(getData().heatingChannels.get(0).getHeatingRelayState()));
     }
 
index ed8a0221e4fcdac1e79203f0b00609cc3fec59ec..5c3aa3af81cbe269a93dd6d5751c28ae597eb9e9 100644 (file)
@@ -110,7 +110,7 @@ public class HotWaterHandler extends DraytonWiserThingHandler<HotWaterData> {
     }
 
     private State getBoostedState() {
-        if (getData().hotWater.size() >= 1) {
+        if (!getData().hotWater.isEmpty()) {
             final HotWaterDTO firstChannel = getData().hotWater.get(0);
 
             if (firstChannel.getOverrideTimeoutUnixTime() != null
@@ -125,7 +125,7 @@ public class HotWaterHandler extends DraytonWiserThingHandler<HotWaterData> {
     }
 
     private State getBoostRemainingState() {
-        if (getData().hotWater.size() >= 1) {
+        if (!getData().hotWater.isEmpty()) {
             final HotWaterDTO firstChannel = getData().hotWater.get(0);
             final Integer overrideTimeout = firstChannel.getOverrideTimeoutUnixTime();
 
index fbf26aa3f778e8765b2c028ae6cb31e22b33998a..98a1bb2807da9fd3537d55ed55806d48c7cbd2b1 100644 (file)
@@ -121,7 +121,6 @@ public class GenericResponseTransformer {
                         // call the custom handler to handle specific / composite channels which do not map 1:1 to JSON
                         // fields.
                         result.putAll(customResponseTransformer.transform(channel, value, jsonData));
-
                     } catch (NumberFormatException | DateTimeParseException ex) {
                         logger.warn("caught exception while parsing data for channel {} (value '{}'). Exception: {}",
                                 channel.getUID().getId(), value, ex.getMessage());
index 9dceae4aecba3ef40118a921d65610a8ca0edcfc..9b1d07becf04db537d812b348beb6aef761ba7ee 100644 (file)
@@ -328,7 +328,6 @@ public class EmotivaProcessorHandler extends BaseThingHandler {
         if (object instanceof EmotivaAckDTO answerDto) {
             // Currently not supported to revert a failed command update, just used for logging for now.
             logger.trace("Processing received '{}' with '{}'", EmotivaAckDTO.class.getSimpleName(), answerDto);
-
         } else if (object instanceof EmotivaBarNotifyWrapper answerDto) {
             logger.trace("Processing received '{}' with '{}'", EmotivaBarNotifyWrapper.class.getSimpleName(),
                     emotivaUdpResponse.answer());
index 966f1752808c3e0d507de671f6acd4c1b50837e4..62a71eabaafde966cb85cd09170cd087df6a386e 100644 (file)
        </channel-type>
 
        <channel-type id="autoOFF" advanced="true">
-               <item-type>Number:Duration</item-type>
+               <item-type>Number:Time</item-type>
                <label>Auto Off</label>
                <description>Automatically switch to off</description>
                <state pattern="%d %unit%"/>
        </channel-type>
 
        <channel-type id="delayRadioOFF" advanced="true">
-               <item-type>Number:Duration</item-type>
+               <item-type>Number:Time</item-type>
                <label>Delay Radio Off</label>
                <description>Delay switch off by radio for given seconds</description>
                <state pattern="%d %unit%"/>
index 30c3976e244392982b48fadedeaab350455f1c30..d296cc94124f66d72f3ee91605c4ccab2c06231a 100644 (file)
@@ -79,7 +79,6 @@ public class EnvoyEntrezConnector extends EnvoyConnector {
                             check(configuration.password, "Password parameter is empty"),
                             check(configuration.siteName, "siteName parameter is empty"))
                     .filter(s -> !s.isEmpty()).collect(Collectors.joining(", "));
-
         }
         if (!message.isEmpty()) {
             return message;
index f0db723ae4a206fd8fb8ccb3ce64f2ba73b65663..73cf45aba0366757209ebe6bda44b489f640640c 100644 (file)
@@ -3,7 +3,7 @@
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:config-description="https://openhab.org/schemas/config-description/v1.0.0"
        xsi:schemaLocation="https://openhab.org/schemas/config-description/v1.0.0
-        https://openhab.org/schemas/config-description-1.0.0.xsd">
+       https://openhab.org/schemas/config-description-1.0.0.xsd">
 
        <config-description uri="bridge-type:freeboxos:api">
                <parameter name="apiDomain" type="text">
index 4c66dbf616014179f6ce29b27347fc3f229694de..dd90407f1befebd53318c1fe457a355c56613242 100644 (file)
@@ -22,8 +22,8 @@ import org.eclipse.jetty.client.HttpClient;
  * Class representing an internet radio based on the frontier silicon chipset. Tested with "hama IR110" and Medion
  * MD87180" internet radios.
  *
- * @author Rainer Ostendorf
- * @author Patrick Koenemann
+ * @author Rainer Ostendorf - Initial contribution
+ * @author Patrick Koenemann - improvements
  * @author Mihaela Memova - removed duplicated check for the percent value range
  */
 public class FrontierSiliconRadio {
index 464318ea250600b867d15d93ca4f475b48d8afbc..63345da3ebf3e82a1f6da06142a1bad9552e3ac6 100644 (file)
@@ -43,8 +43,8 @@ import org.xml.sax.SAXException;
  *
  * This class parses this XML data and provides functions for reading and casting typical fields.
  *
- * @author Rainer Ostendorf
- * @author Patrick Koenemann
+ * @author Rainer Ostendorf - Initial contribution
+ * @author Patrick Koenemann - Improvements
  *
  */
 public class FrontierSiliconRadioApiResult {
index 756ad47a6d8bcb979cfd56ed0a371ba9ed013adb..3a29cbc1494802357215250602730602a6e9fe44 100644 (file)
@@ -26,8 +26,8 @@ import org.slf4j.LoggerFactory;
 /**
  * This class holds the http-connection and session information for controlling the radio.
  *
- * @author Rainer Ostendorf
- * @author Patrick Koenemann
+ * @author Rainer Ostendorf - Initial contribution
+ * @author Patrick Koenemann - improvements
  * @author Svilen Valkanov - replaced Apache HttpClient with Jetty
  * @author Mihaela Memova - changed the calling of the stopHttpClient() method, fixed the hardcoded URL path, fixed the
  *         for loop condition part
@@ -110,7 +110,6 @@ public class FrontierSiliconRadioConnection {
                 isLoggedIn = true;
                 return true; // login successful :-)
             }
-
         } catch (Exception e) {
             logger.debug("Fatal transport error: {}", e.toString());
             throw new IOException(e);
index 0244c0801550b502fe997ca14e865617d92f3e34..9c3475c7b31ca058538e662cd0703ef268755c18 100644 (file)
@@ -15,7 +15,7 @@ package org.openhab.binding.fsinternetradio.internal.radio;
 /**
  * Internal constants for the frontier silicon radio.
  *
- * @author Markus Rathgeb - Moved the constants to separate class
+ * @author Markus Rathgeb - Initial contribution, moved the constants to separate class
  */
 public class FrontierSiliconRadioConstants {
 
index 54faf94b02ab550e93f1acf3d1cf381d3de12eae..4018ae5110d363903383af92d4766fb06e712cd0 100644 (file)
@@ -154,7 +154,6 @@ public class GroupePSAHandler extends BaseThingHandler {
                 this.onlineIntervalM = onlineIntervalM != null ? onlineIntervalM : DEFAULT_ONLINE_INTERVAL_M;
                 startGroupePSAPolling(pollingIntervalM);
             }
-
         } else {
             updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_UNINITIALIZED);
         }
@@ -359,7 +358,6 @@ public class GroupePSAHandler extends BaseThingHandler {
                             Charging::getRemainingTime, x -> new BigDecimal(x.getSeconds()), Units.SECOND);
                     updateState(CHANNEL_ELECTRIC_CHARGING_NEXTDELAYEDTIME, energy, Energy::getCharging,
                             Charging::getNextDelayedTime, x -> new BigDecimal(x.getSeconds()), Units.SECOND);
-
                 }
             }
         }
index 4d3eeaa758db8b31ad6b91a631cb5320c9c50f38..04b577cc4e3355f50b9bddcf87ef510327fcb25b 100644 (file)
@@ -508,7 +508,6 @@ public class GrowattCloud implements AutoCloseable {
 
         DeviceType deviceType = getDeviceTypeChecked(deviceId);
         switch (deviceType) {
-
             case MIX:
             case SPA:
                 setTimeProgram(deviceId, deviceType,
index 33152e38662d9020d97468c127c639f0aa47b099..27a6d156492e7313d3e37b5c95085dcb193fd082 100644 (file)
@@ -23,7 +23,7 @@ import org.openhab.core.i18n.ConfigurationException;
 /**
  * Handles the authentication to Homematic server.
  *
- * @author Christian Kittel
+ * @author Christian Kittel - Initial contribution
  */
 @NonNullByDefault
 public class AuthenticationHandler {
index acc172422f0b0b7b4b63e4c71d2aac2738e8cee6..91405efb9fb6217b75c3a21de2a6c22ec7f724dc 100644 (file)
@@ -123,7 +123,6 @@ public class HomematicDeviceDiscoveryService
                     thingHandler.getGateway().setInstallMode(false, 0);
                 }
             }
-
         } catch (Exception ex) {
             logger.warn("Failed to disable Homematic controller's install mode", ex);
         }
index 7444fa4f8587fc6980718acb9a5e98de94ee8fa5..9e9f74ff604e1b8fa88be754011b9666bfb41d50 100644 (file)
@@ -103,7 +103,7 @@ public abstract class HomeWizardDeviceHandler extends BaseThingHandler {
      *
      * @param payload The data parsed from the data Json file
      */
-    abstract protected void handleDataPayload(DataPayload payload);
+    protected abstract void handleDataPayload(DataPayload payload);
 
     /**
      *
index 36c942c1ee8083077647daf0368d13bcef0b18af..11197b7f9f76f70336fd57e5f1ee12ed12c0e016 100644 (file)
@@ -47,7 +47,7 @@ public abstract class HomeWizardStatefulDeviceHandler extends HomeWizardDeviceHa
      *
      * @param payload The data parsed from the state Json file
      */
-    abstract protected void handleStatePayload(StatePayload payload);
+    protected abstract void handleStatePayload(StatePayload payload);
 
     protected void pollState() {
         final String stateResult;
index 37f7c6e8f7981e354b6f22fbe137c749ac3bb4ad..300acb703aeceedd87d80faed28ebe1abf5ed4be 100644 (file)
@@ -119,7 +119,7 @@ public class Clip2BridgeHandler extends BaseBridgeHandler {
     private final Bundle bundle;
     private final LocaleProvider localeProvider;
     private final TranslationProvider translationProvider;
-    private final Map<String, Resource> automationsCache = new ConcurrentHashMap<>();;
+    private final Map<String, Resource> automationsCache = new ConcurrentHashMap<>();
     private final Set<String> automationScriptIds = ConcurrentHashMap.newKeySet();
     private final ChannelGroupUID automationChannelGroupUID;
 
@@ -853,7 +853,6 @@ public class Clip2BridgeHandler extends BaseBridgeHandler {
             Resource cachedAutomation = automationsCache.get(automation.getId());
             return Objects.isNull(cachedAutomation) || !automation.getName().equals(cachedAutomation.getName());
         })) {
-
             synchronized (automationsCache) {
                 automationsCache.clear();
                 automationsCache.putAll(automations.stream().collect(Collectors.toMap(a -> a.getId(), a -> a)));
index 358a9ade30c0b37663bfa1304da7b4d717a82ce7..5b4cbed88b4debd0fdd9e9a5600d0f6bd3b58cd8 100644 (file)
@@ -140,7 +140,6 @@ public class ICloudDeviceHandler extends BaseThingHandler implements ICloudDevic
         if (channelId.equals(FIND_MY_PHONE)) {
             if (command == OnOffType.ON) {
                 try {
-
                     if (deviceInformationRecord == null) {
                         this.logger
                                 .debug("Can't send Find My Device request, because deviceInformationRecord is null!");
index 1a112c33107d586f3e62f3025d991ec2d568929e..51206dee5c2647da00d76118221596a5e6c68841 100644 (file)
@@ -117,7 +117,6 @@ public class PushButtonToCommandProfile implements TriggerProfile {
                 logger.warn("Parameter '{}' is not a valid command type, using default value '{}'", param, defValue);
                 retval = defValue;
             }
-
         } else {
             logger.debug("Parameter '{}' is not of type String, using default value '{}'", param, defValue);
             retval = defValue;
index 102250a1177f42f08e3d72bcf840ee9c59c372b0..85b0bd1119d5f418591271187f9aeb82dac3259f 100644 (file)
@@ -444,7 +444,6 @@ public class Port {
                                 logger.trace("retransmitting msg: {}", msg);
                                 ioStream.write(msg.getData());
                             }
-
                         }
                         // if rate limited, need to sleep now.
                         if (msg.getQuietTime() > 0) {
index be0053110a97ffd009085b387f5e90c22f15188e..6b4e847ce10adb2f762b6a7a78ebd68aaad04ae6 100644 (file)
                <state readOnly="true" pattern="%.0f %unit%"/>
        </channel-type>
        <channel-type id="device-local-battery-voltage">
-               <item-type>Number:ElectricalPotential</item-type>
+               <item-type>Number:ElectricPotential</item-type>
                <label>Battery Voltage</label>
                <description>Current battery voltage</description>
                <category>Energy</category>
index 03e30718419720e1ffbd7ca9fab127436b683625..23c2bb8c36dea3700c951ed05904611f4c3f3a2f 100644 (file)
@@ -194,7 +194,7 @@ public class CloudConnector {
             try {
                 JsonObject homelistInfo = cl.getHomeList(country.trim().toLowerCase());
                 final HomeListDTO homelist = GSON.fromJson(homelistInfo, HomeListDTO.class);
-                if (homelist != null && homelist.getHomelist() != null && homelist.getHomelist().size() > 0) {
+                if (homelist != null && homelist.getHomelist() != null && !homelist.getHomelist().isEmpty()) {
                     homeLists.put(country, homelist);
                 }
             } catch (JsonSyntaxException e) {
index 833d043f9fa22e5a777978ad85e650b61d1dd00d..2ce054cf682b505ddaf01e88023b36a33dbf74ab 100644 (file)
@@ -323,7 +323,6 @@ public class ModbusDataThingHandler extends BaseThingHandler {
                 int writeStartRelative = writeStart - pollStart;
                 data = new ModbusRegisterArray(allMutatedBytes[writeStartRelative * 2],
                         allMutatedBytes[writeStartRelative * 2 + 1]);
-
             } else {
                 data = ModbusBitUtilities.commandToRegisters(transformedCommand, writeValueType);
             }
index 88e30604725469f772ebc4938ca747c980e93e3b..156274a5a493c2f443bf26127044b20dc46cce2c 100644 (file)
@@ -157,7 +157,6 @@ public class ModbusGainOffsetProfile<Q extends Quantity<Q>> implements StateProf
                     result = applyGainTowardsItem(offsetted, gain);
                 } else {
                     result = applyGainTowardsHandler(quantityState, gain).subtract(pregainOffsetQt);
-
                 }
             } catch (UnconvertibleException | UnsupportedOperationException e) {
                 logger.warn(
index c5d1f0f3680cfc6b52ee564eeb86be908d3c6404..0074c771ab18d73c8f22a03df1f7b4c35ea39904 100644 (file)
@@ -48,7 +48,7 @@
        <br />Any other value than the above types will be interpreted as static text, in which case the actual content of the polled
                value is ignored.
        <br />Multiple transformations can be chained by listing each transformation on a separate line,
-         or by concatenating them with "∩", for example SERVICE1(ARG1)∩SERVICE2(ARG2)]]></description>
+       or by concatenating them with "∩", for example SERVICE1(ARG1)∩SERVICE2(ARG2)]]></description>
                                <default>default</default>
                        </parameter>
                        <parameter name="readValueType" type="text">
        <br /><br />Use "default" to communicate that no transformation is done and value should be passed as is.
        <br />Use SERVICENAME(ARG) or SERVICENAME:ARG to use transformation service.
        <br />Any other value than the above types will be interpreted as static text, in which case the actual content of the command
-         value is ignored.
+       value is ignored.
        <br />Multiple transformations can be chained by listing each transformation on a separate line,
-         or by concatenating them with "∩", for example SERVICE1(ARG1)∩SERVICE2(ARG2)]]></description>
+       or by concatenating them with "∩", for example SERVICE1(ARG1)∩SERVICE2(ARG2)]]></description>
                                <default>default</default>
                        </parameter>
                        <parameter name="writeValueType" type="text">
index 6a809ff12ad4f1b9d6e854ec63e6c16b00f09e3d..a8444bcb8dfb15a6aace8abcad7108a6dd6ad2af 100644 (file)
@@ -50,7 +50,7 @@
                <parameter name="duvThreshold" type="decimal" required="true" min="0" max="1" step="0.001">
                        <label>Duv Threshold</label>
                        <description><![CDATA[
-                           Duv values at or below this value on a RGBWW color control will trigger white mode at the appropriate color temperature.
+                               Duv values at or below this value on a RGBWW color control will trigger white mode at the appropriate color temperature.
                                1 will effectively disable this feature.
                                See <a href="https://www.waveformlighting.com/tech/calculate-duv-from-cie-1931-xy-coordinates/">this link</a> for more information on how this is calculated.
                                ]]>
index 2ba8ad2aa1b19afddde068530cfbac689da087f5..62361348d26aa746313b8464715e5271b1ba808f 100644 (file)
@@ -364,7 +364,6 @@ public class ChannelState implements MqttMessageSubscriber {
             // Only pass numeric value for QuantityType.
             if (mqttCommandValue instanceof QuantityType<?> qtCommandValue) {
                 cValue = new DecimalType(qtCommandValue.toBigDecimal());
-
             }
             String commandString = mqttFormatter.getMQTTpublishValue(cValue, "%s");
             Optional<String> transformedValue = outgoingTransformation.apply(commandString);
index 55e5bd47284afbaa00fa5730c9f7b1912ea5e2a6..49068e5680fcde5a5817ef2dc8900ac603d03033 100644 (file)
                        <label>Publish Online Status</label>
                        <default>true</default>
                        <description><![CDATA[
-         Publish <tt>online</tt> to <tt>homeassistant/status</tt> when discovering Home Assistant
-         things in order to trigger devices to publish up-to-date discovery information.
-                                If you also run Home Assistant <i>and</i> other services that depend on knowing if Home
-                                Assistant is not running, then it's possible for those services to be out-of-sync with
-                                the actual status of Home Assistant, and you may want to disable this.
+                               Publish <tt>online</tt> to <tt>homeassistant/status</tt> when discovering Home Assistant
+                               things in order to trigger devices to publish up-to-date discovery information.
+                               If you also run Home Assistant <i>and</i> other services that depend on knowing if Home
+                               Assistant is not running, then it's possible for those services to be out-of-sync with
+                               the actual status of Home Assistant, and you may want to disable this.
                                ]]></description>
                </parameter>
 
index 7697bc056923ca2fbbafc81e32ace94ae1fbc8a9..e87e4b7277d34b9c7d4bd60ce76756628ea72065 100644 (file)
@@ -114,7 +114,6 @@ public class GatewayPayloadParser {
                 // below
                 // The payload length (might depend on format version ) is validated by parser.parse call
                 throw new IllegalArgumentException("Manufacturerer data is too short");
-
             }
             if ((bytes[4] & 0xff) != 0xff) {
                 logger.debug("Data is not representing manufacturer specific bluetooth advertisement: {}",
index 303d348e774725ba424d61f267ecf70cb672594a..900b7d99b23c6805dd2e2af5f404241924344c64 100644 (file)
@@ -291,7 +291,7 @@ public class MyBMWTokenController {
         UrlEncoded.decodeTo(encodedUrl, tokenMap, StandardCharsets.US_ASCII);
         final StringBuilder codeFound = new StringBuilder();
         tokenMap.forEach((key, value) -> {
-            if (value.size() > 0) {
+            if (!value.isEmpty()) {
                 String val = value.get(0);
                 if (key.endsWith(CODE) && (val != null)) {
                     codeFound.append(val.toString());
index 07ae623cc7bf43342b47d0b6c65ef7f177ccfe51..8b43aa5a1c45a2e90ea8dc4bff00deb823526283 100644 (file)
@@ -51,7 +51,6 @@ public class Utils {
             int button = (address >> 21) & 0x07;
 
             return leftPadWithZeros(Integer.toHexString(nikobusAddress), 6) + ":" + mapButton(button);
-
         } catch (NumberFormatException e) {
             return "[" + addressString + "]";
         }
index 7a092fbd9e5f687ee27a501c8b3787cfce48e6cd..17c4027f3cec46f36551cdae2b06f6be05c1406c 100644 (file)
@@ -48,7 +48,6 @@ public class NapierCityCouncil implements WaterWebService {
         switch (region.toLowerCase()) {
             case "napier":
                 return HOSTNAME + REGION_NAPIER;
-
         }
         return "";
     }
index 28227eef950a55ac9e6c1a010a2d7cf3d59efd85..aef47b37f6730524d702daba5564cd58da009b18 100644 (file)
@@ -382,7 +382,7 @@ class OpenSprinklerHttpApiV100 implements OpenSprinklerApi {
             ContentResponse response = null;
             int retriesLeft = Math.max(1, config.retry);
             boolean connectionSuccess = false;
-            while (connectionSuccess == false && retriesLeft > 0) {
+            while (!connectionSuccess && retriesLeft > 0) {
                 retriesLeft--;
                 try {
                     response = withGeneralProperties(httpClient.newRequest(location))
@@ -393,7 +393,7 @@ class OpenSprinklerHttpApiV100 implements OpenSprinklerApi {
                             e.getMessage());
                 }
             }
-            if (connectionSuccess == false) {
+            if (!connectionSuccess) {
                 throw new CommunicationApiException("Request to OpenSprinkler device failed");
             }
             if (response != null && response.getStatus() != HTTP_OK_CODE) {
index 0f2813e5549c2d817d81ef20b550edf4065b953d..1e3bfd2ce20e43dbeb363f14de60b3b7d18629f5 100644 (file)
@@ -79,7 +79,6 @@ public class PHCHandler extends BaseThingHandler {
             times[1] = (short) (((BigDecimal) getConfig().get(UP_DOWN_TIME_2)).shortValue() * 10);
             times[2] = (short) (((BigDecimal) getConfig().get(UP_DOWN_TIME_3)).shortValue() * 10);
             times[3] = (short) (((BigDecimal) getConfig().get(UP_DOWN_TIME_4)).shortValue() * 10);
-
         } else if (getThing().getThingTypeUID().equals(THING_TYPE_DIM)) {
             times[0] = (((BigDecimal) getConfig().get(DIM_TIME_1)).shortValue());
             times[1] = (((BigDecimal) getConfig().get(DIM_TIME_2)).shortValue());
index 5ffc6405665037c5fa3dfd614313a80deaad8c54..3779b857caf63338e137b9f8a2c075ea53498c03 100644 (file)
@@ -137,7 +137,6 @@ public class PilightConnector implements Runnable, Closeable {
                     connect();
                 }
             }
-
         } catch (InterruptedException e) {
             logger.debug("Interrupting thread.");
             Thread.currentThread().interrupt();
index a06953906d9fde37a9a5bcb105c3a92f26ad61e4..cb998dac3521cd28aef13c22e7754ea9c64d5c6b 100644 (file)
@@ -59,7 +59,6 @@ public class SerialAvrConnection extends StreamAvrConnection {
                     .collect(Collectors.joining(", "));
             throw new IOException(
                     "Serial port with name " + portName + " does not exist. Available port names: " + availablePorts);
-
         }
 
         try {
index 6b314c279f0db8373c9257d2e5125cc57ce2a70f..ff69436609dc850428b7f6f596d12c731986fe04 100644 (file)
@@ -123,7 +123,6 @@ public class QbusBridgeHandler extends BaseBridgeHandler {
                             bridgePending("Waiting for Qbus client to come online");
                             return;
                         }
-
                     }
                 }
             }
index 4268c42dc15bd2cbce288aa056400c5ad65c8d33..ef4cadc09a07b00303862ad03216b83aeaf30b49 100644 (file)
@@ -244,7 +244,6 @@ public final class QbusCommunication extends BaseThingHandler {
         try {
             while (!Thread.currentThread().isInterrupted() && ((qMessage = reader.readLine()) != null)) {
                 readMessage(qMessage);
-
             }
         } catch (IOException e) {
             if (!listenerStopped) {
@@ -301,7 +300,6 @@ public final class QbusCommunication extends BaseThingHandler {
             }
             if ((writer == null) || (writer.checkError())) {
                 logger.warn("Error resending message");
-
             }
         }
     }
@@ -551,7 +549,6 @@ public final class QbusCommunication extends BaseThingHandler {
                 throw new IOException("Cannot read from socket, reader not connected.");
             }
             readMessage(reader.readLine());
-
         } else {
             QbusBridgeHandler handler = bridgeCallBack;
             if (handler != null) {
@@ -584,7 +581,6 @@ public final class QbusCommunication extends BaseThingHandler {
             if (handler != null) {
                 handler.bridgeOnline();
             }
-
         } else {
             if (handler != null) {
                 handler.bridgeOffline(ThingStatusDetail.CONFIGURATION_ERROR, "No serial nr defined");
index 2a9c4bdcb92328f02f986f71c8c21a2c7e2dda03..580c3e53448bf5a53f91a673cbc26bff46f173ae 100644 (file)
@@ -29,7 +29,7 @@ import org.openhab.core.types.Type;
  * RFXCOM data class for energy message.
  *
  * @author Unknown - Initial contribution
- * @author Pauli Anttila
+ * @author Pauli Anttila - Migrated to OH2
  */
 public class RFXComEnergyMessage extends RFXComBatteryDeviceMessage<RFXComEnergyMessage.SubType> {
 
index 24d6331484d5494b21f9539f9205d44b8989b38c..d3b08520aced7fcf2f97fa6a1547dcabf171c3f9 100644 (file)
@@ -19,7 +19,7 @@ import org.openhab.core.types.Type;
  * RFXCOM data class for control message.
  *
  * @author Pauli Anttila - Initial contribution
- * @author Mike Jagdis
+ * @author Mike Jagdis - Improvements
  */
 public class RFXComInterfaceControlMessage extends RFXComBaseMessage {
     private byte[] data = new byte[14];
index 83949cf0db953e3162df9617a2f696127804e4c2..2883bd04fd727bbbece402b7f89dbfa11b04883a 100644 (file)
@@ -33,7 +33,7 @@ import org.openhab.core.types.UnDefType;
  * RFXCOM data class for lighting1 message. See X10, ARC, etc..
  *
  * @author Evert van Es, Cycling Engineer - Initial contribution
- * @author Pauli Anttila
+ * @author Pauli Anttila - Migrated to OH2
  */
 public class RFXComLighting1Message extends RFXComDeviceMessageImpl<RFXComLighting1Message.SubType> {
 
index 06ddc9c9345a785d1c07ce6c8f2b843198c0ecdb..4e9ca090d572d9458af6f0c6bbe90a13a0c4f852 100644 (file)
@@ -41,7 +41,7 @@ import org.openhab.core.types.UnDefType;
  * RFXCOM data class for lighting5 message.
  *
  * @author Paul Hampson, Neil Renaud - Initial contribution
- * @author Pauli Anttila
+ * @author Pauli Anttila - Migrated to OH2
  * @author Martin van Wingerden - added support for IT and some other subtypes
  */
 public class RFXComLighting5Message extends RFXComDeviceMessageImpl<RFXComLighting5Message.SubType> {
index 825c601ed0eda6b1ebe06a20cb03e269e097f93e..2f3fc93104a57b57211dedb977d1bc232d90779a 100644 (file)
@@ -37,7 +37,7 @@ import org.openhab.core.util.HexUtils;
 /**
  * RFXCOM data class for raw messages.
  *
- * @author James Hewitt-Thomas - New addition to the PRO RFXCom firmware
+ * @author James Hewitt-Thomas - Initial contribution, new addition to the PRO RFXCom firmware
  */
 public class RFXComRawMessage extends RFXComDeviceMessageImpl<RFXComRawMessage.SubType> {
 
index 279e14a54996a04ae73f561f7de0b2be2122547e..c9805693a8a619503d7af9f441079cae1b4aa1bf 100644 (file)
@@ -32,7 +32,7 @@ import org.openhab.core.types.Type;
  * (i.e. X10 Security, Visonic PowerCode, Meiantech, etc.)
  *
  * @author David Kalff - Initial contribution
- * @author Pauli Anttila
+ * @author Pauli Anttila - Improvements
  */
 public class RFXComSecurity1Message extends RFXComBatteryDeviceMessage<RFXComSecurity1Message.SubType> {
 
index 83e39f0553a5b74d36746109ee5998bd6c7e4b07..c4423735a7589735f14c01cd155741110c0e3dea 100644 (file)
@@ -29,7 +29,7 @@ import org.openhab.core.types.UnDefType;
 /**
  * RFXCOM data class for UV and temperature message.
  *
- * @author Damien Servant - OpenHAB1 version
+ * @author Damien Servant - Initial contribution, OpenHAB1 version
  * @author Mike Jagdis - Initial contribution, OpenHAB2 version
  */
 public class RFXComUVMessage extends RFXComBatteryDeviceMessage<RFXComUVMessage.SubType> {
index df56e4f9f78d80b36d4cff77f2f4086834101132..29511448723a572ddc73b2fc7cb4a1de01cf85a0 100644 (file)
@@ -30,7 +30,7 @@ import org.openhab.core.util.HexUtils;
 /**
  * Test for RFXCom-binding
  *
- * @author James Hewitt-Thomas - New addition to the PRO RFXCom firmware
+ * @author James Hewitt-Thomas - Initial contribution, new addition to the PRO RFXCom firmware
  */
 @NonNullByDefault
 public class RFXComRawMessageTest {
index f4ddbbe7a4e5b3d1f46d9549065d21e4ee110cba..e9bad02098aff50302f03e139618edf3c9ae9de1 100644 (file)
@@ -173,7 +173,6 @@ public abstract class SerialThingHandler extends BaseThingHandler implements Ser
                     availablePorts);
             updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, description);
             return;
-
         }
 
         // initialize serial port
@@ -322,7 +321,6 @@ public abstract class SerialThingHandler extends BaseThingHandler implements Ser
                         Thread.sleep(sleep);
                     } catch (InterruptedException e) {
                     }
-
                 }
             } catch (InterruptedIOException e) {
                 Thread.currentThread().interrupt();
index 3da84165530fbd890454eac066beadffe72e7267..789d7754d29af52ffa2df550d5b8f8a3eab2e7d5 100644 (file)
@@ -1,9 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <thing:thing-descriptions bindingId="salus"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:thing="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0"
-       xsi:schemaLocation="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0
-                                                 org.eclipse.smarthome.thing-description.xsd">
+       xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
+       xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
 
        <bridge-type id="salus-aws-bridge">
                <label>AWS Salus Cloud</label>
index 220353f9f5ad4b19b001c0192764c704ede9c36e..639833e5a105e68f58a9d0c28c837bf02ba7a4e9 100644 (file)
@@ -1,9 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <thing:thing-descriptions bindingId="salus"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:thing="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0"
-       xsi:schemaLocation="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0
-                                                 org.eclipse.smarthome.thing-description.xsd">
+       xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
+       xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
 
        <bridge-type id="salus-cloud-bridge">
                <label>Salus Cloud</label>
index 3a67709860849d27a45881d133cb12b81a38e457..79c7419415ba78cb3c92693c5e759a6d12748468 100644 (file)
@@ -84,7 +84,7 @@
                <state readOnly="true"/>
        </channel-type>
        <channel-type id="generic-input-number-channel">
-               <item-type>Number:Dimensionsless</item-type>
+               <item-type>Number:Dimensionless</item-type>
                <label>Generic Number Input</label>
                <description>
                        This channel type represents a generic input.
index 3c33af5681882474185c625e0de1df0a79255676..eb66d57705a1b32193aed0a13136588e421223fc 100755 (executable)
@@ -86,7 +86,7 @@ public class SamsungTvHandler extends BaseThingHandler implements RegistryListen
     private static final String HTTP_ENDPOINT_V2 = "/api/v2/";
 
     // common Samsung TV remote control ports
-    private final static List<Integer> PORTS = List.of(55000, 1515, 7001, 15500);
+    private static final List<Integer> PORTS = List.of(55000, 1515, 7001, 15500);
 
     private final Logger logger = LoggerFactory.getLogger(SamsungTvHandler.class);
 
@@ -120,13 +120,13 @@ public class SamsungTvHandler extends BaseThingHandler implements RegistryListen
     @NonNullByDefault({})
     public class TVProperties {
         class Device {
-            boolean FrameTVSupport;
-            boolean GamePadSupport;
-            boolean ImeSyncedSupport;
-            String OS;
-            String PowerState;
-            boolean TokenAuthSupport;
-            boolean VoiceSupport;
+            boolean frameTVSupport;
+            boolean gamePadSupport;
+            boolean imeSyncedSupport;
+            String oS;
+            String powerState;
+            boolean tokenAuthSupport;
+            boolean voiceSupport;
             String countryCode;
             String description;
             String firmwareVersion;
@@ -143,22 +143,22 @@ public class SamsungTvHandler extends BaseThingHandler implements RegistryListen
         String isSupport;
 
         public boolean getFrameTVSupport() {
-            return Optional.ofNullable(device).map(a -> a.FrameTVSupport).orElse(false);
+            return Optional.ofNullable(device).map(a -> a.frameTVSupport).orElse(false);
         }
 
         public boolean getTokenAuthSupport() {
-            return Optional.ofNullable(device).map(a -> a.TokenAuthSupport).orElse(false);
+            return Optional.ofNullable(device).map(a -> a.tokenAuthSupport).orElse(false);
         }
 
         public String getPowerState() {
             if (!getOS().isBlank()) {
-                return Optional.ofNullable(device).map(a -> a.PowerState).orElse("on");
+                return Optional.ofNullable(device).map(a -> a.powerState).orElse("on");
             }
             return "off";
         }
 
         public String getOS() {
-            return Optional.ofNullable(device).map(a -> a.OS).orElse("");
+            return Optional.ofNullable(device).map(a -> a.oS).orElse("");
         }
 
         public String getWifiMac() {
@@ -347,10 +347,10 @@ public class SamsungTvHandler extends BaseThingHandler implements RegistryListen
     public String fetchPowerState() {
         logger.trace("{}: fetching TV Power State", host);
         TVProperties properties = fetchTVProperties(0, 2);
-        String PowerState = properties.getPowerState();
-        setPowerState("on".equals(PowerState));
-        logger.debug("{}: PowerState is: {}", host, PowerState);
-        return PowerState;
+        String powerState = properties.getPowerState();
+        setPowerState("on".equals(powerState));
+        logger.debug("{}: PowerState is: {}", host, powerState);
+        return powerState;
     }
 
     public boolean handleCommand(String channel, Command command, int ms) {
@@ -638,7 +638,6 @@ public class SamsungTvHandler extends BaseThingHandler implements RegistryListen
      * @return true if service restated or created, false otherwise
      */
     private synchronized boolean createService(String type, String udn) {
-
         Optional<SamsungTvService> service = findServiceInstance(type);
 
         if (service.isPresent()) {
index 6c538b80b57382d5d20f17a19d8508e8fb716234..7c9650c898ab474750afe4ed1197dffc2f273dc7 100644 (file)
@@ -32,7 +32,6 @@ public class SensiboModelTest {
 
     @Test
     public void testCaseInsensitiveMacAddress() throws IOException {
-
         final PodDetailsDTO rsp = wireHelper.deSerializeResponse("/get_pod_details_response.json", PodDetailsDTO.class);
         SensiboSky sky = new SensiboSky(rsp);
 
index cc8499e4e6b11b2230628faddaeefacdb06a2e85..ac65505d2bb084ec5286aad281560cb47b2e09f0 100644 (file)
@@ -73,7 +73,6 @@ public class HTTPHandler {
                         }
                         callback.onError(Objects.requireNonNullElse(failure, "Unknown error"));
                     } else {
-
                         callback.onResponse(Objects.requireNonNull(getContentAsString()));
                     }
                 }
index 6d02dca6d8baa142068c0f312525266000db2bda..a821816daae84cc861be0b716e7683aad442e584 100644 (file)
@@ -73,8 +73,7 @@ public class TimeOfDayTypeConverter extends AbstractTypeConverter {
         if ("----".equals(value.getAsString())) {
             return new DateTimeType(ZonedDateTime.now(this.timeZoneProvider.getTimeZone()));
         } else {
-
-            if (unit.equals("h:m")) {
+            if ("h:m".equals(unit)) {
                 String st = value.getAsString();
                 String[] parts = st.split(":");
                 int h = Integer.parseInt(parts[0]);
@@ -83,7 +82,7 @@ public class TimeOfDayTypeConverter extends AbstractTypeConverter {
                 Unit<Time> targetUnit = Units.MINUTE;
                 return new QuantityType<>(h * 60 + m, targetUnit);
 
-            } else if (unit.equals("m:s")) {
+            } else if ("m:s".equals(unit)) {
                 String st = value.getAsString();
                 String[] parts = st.split(":");
                 int m = Integer.parseInt(parts[0]);
@@ -92,7 +91,7 @@ public class TimeOfDayTypeConverter extends AbstractTypeConverter {
                 Unit<Time> targetUnit = Units.SECOND;
                 return new QuantityType<>(m * 60 + s, targetUnit);
 
-            } else if (unit.equals("h")) {
+            } else if ("h".equals(unit)) {
                 int val = Integer.parseInt(value.getAsString());
 
                 Unit<Time> targetUnit = Units.HOUR;
index 323a765eff56cd9d9630235be9302e400dd28158..30944458efc6ef7dd8db3a4678d595a7e2ce0e9e 100644 (file)
@@ -129,7 +129,6 @@ public class SiemensHvacBridgeThingHandler extends BaseBridgeHandler {
                     return df.format(dt);
                 }
             }
-
         } catch (Exception ex) {
         }
         return "unknown";
index 4c1c4ddcfbac4a566550c23c38cf5887c2dd921d..fde97e25b6ff84e2259872b4ccf75aea1c23393e 100644 (file)
@@ -253,7 +253,6 @@ public class SiemensHvacHandlerImpl extends BaseThingHandler {
             } catch (ConverterException ex) {
                 logger.warn("{}, for uid: {}, please check the item type", ex.getMessage(), uid);
             }
-
         }
     }
 
@@ -336,7 +335,6 @@ public class SiemensHvacHandlerImpl extends BaseThingHandler {
 
                         logger.trace("Write request response: {} ", response);
                     }
-
                 } else {
                     logger.debug("Failed to get converted state from datapoint '{}'", dp);
                 }
index 51b4a8e4f17f45b6113c1f5bae3857c53ad967ce..5116b64d514e7b5eebca27f579d47054f0e9eb49 100644 (file)
@@ -186,7 +186,6 @@ public class SiemensHvacMetadataDataPoint extends SiemensHvacMetadata {
                 detailsResolved = true;
                 return;
             }
-
         }
 
         if (desc != null) {
index 95880ccbff964c6f09a12aa34ef3ab86f52f7852..e6e951324cad06a643c2874d8b8e9015b4bbe5ef 100644 (file)
@@ -431,9 +431,7 @@ public class SiemensHvacMetadataRegistryImpl implements SiemensHvacMetadataRegis
                         for (SiemensHvacMetadata child : childs) {
                             generateThingsType(child, groupTypes, menu);
                         }
-
                     }
-
                 }
 
                 tt = createThingType(device, groupTypes);
@@ -511,7 +509,6 @@ public class SiemensHvacMetadataRegistryImpl implements SiemensHvacMetadataRegis
                     groupTypes.add(groupType);
                 }
             }
-
         }
     }
 
@@ -819,7 +816,6 @@ public class SiemensHvacMetadataRegistryImpl implements SiemensHvacMetadataRegis
                         }
 
                         idx++;
-
                     }
                 }
             }
@@ -839,10 +835,7 @@ public class SiemensHvacMetadataRegistryImpl implements SiemensHvacMetadataRegis
                 lcHvacConnector.resetSessionId(null, false);
                 lcHvacConnector.resetSessionId(null, true);
             }
-
-        } catch (
-
-        Exception e) {
+        } catch (Exception e) {
             logger.error("siemensHvac:ResolveDpt:Error during dp reading: {}", e.getLocalizedMessage());
             // Reset sessionId so we redone _auth on error
         }
@@ -933,7 +926,6 @@ public class SiemensHvacMetadataRegistryImpl implements SiemensHvacMetadataRegis
 
                 lcDevices.add(deviceObj);
             }
-
         } catch (Exception e) {
             logger.error("siemensHvac:ResolveDpt:Error during dp reading: {}", e.getLocalizedMessage());
             // Reset sessionId so we redone _auth on error
@@ -1161,14 +1153,12 @@ public class SiemensHvacMetadataRegistryImpl implements SiemensHvacMetadataRegis
                                             child.setDptId(dptId);
                                         }
                                     }
-
                                 }
                             }
                         }
                     }
                 });
             }
-
         }
     }
 
@@ -1213,7 +1203,6 @@ public class SiemensHvacMetadataRegistryImpl implements SiemensHvacMetadataRegis
             }
         } catch (IOException ioe) {
             logger.warn("Couldn't read Siemens MetaData information from file '{}'.", file.getAbsolutePath());
-
         }
     }
 
@@ -1238,10 +1227,8 @@ public class SiemensHvacMetadataRegistryImpl implements SiemensHvacMetadataRegis
                     os.flush();
                 }
             }
-
         } catch (IOException ioe) {
             logger.warn("Couldn't write Siemens MetaData information to file '{}'.", file.getAbsolutePath());
-
         }
     }
 
index eaa5bc649d69f022c43769f6a03481a8aa4228c8..b85a3c4bb25b6630c18564e67b0b71594aebdbef 100644 (file)
@@ -374,7 +374,6 @@ public class SiemensHvacConnectorImpl implements SiemensHvacConnector {
                                         "Session request auth was unsuccessful in _doAuth(), please verify login parameters");
                             }
                         }
-
                     }
                 }
             }
@@ -469,7 +468,6 @@ public class SiemensHvacConnectorImpl implements SiemensHvacConnector {
                             return resultObj;
                         }
                     }
-
                 }
 
                 return null;
@@ -541,7 +539,6 @@ public class SiemensHvacConnectorImpl implements SiemensHvacConnector {
                     } catch (SiemensHvacException ex) {
                         logger.debug("error unregistring handler: {}", handler);
                     }
-
                 }
             }
 
index 770eb43ada1b57a2d002ee6b74e21aeca65d8038..5403c0414a5745de3086070c34d10127f32c9f3c 100644 (file)
@@ -228,7 +228,6 @@ public class SiemensHvacRequestListener extends BufferingResponseListener
                                     mayRetry);
                             return;
                         }
-
                     } else {
                         logger.debug("error(5): invalid response from gateway, missing Result entry");
                         hvacConnector.onError(result.getRequest(), requestHandler, ErrorSource.ErrorBridge, mayRetry);
index 3ca8ace9a9eb15e1b409935ad026974ff57bbb8b..4266938a7a9d12c236944f4b2cadba4f06bf6b30 100644 (file)
@@ -132,7 +132,6 @@ public class SolarMaxHandler extends BaseThingHandler {
                 State state = solarMaxData.getDataDateTime();
                 logger.debug("Update channel state: {} - {}", channelId, state);
                 updateState(channel.getUID(), state);
-
             } else {
                 // must be somthing to collect from the device, so...
                 if (solarMaxData.has(SolarMaxCommandKey.valueOf(channelId))) {
index 4e964312c92af954895a0eac223e0ed2c87f5433..d381669b923e885346c8fd233e8707ffdc9468a1 100644 (file)
        </channel-type>
 
        <channel-type id="co2_concentration">
-               <item-type>Number:DimensionLess</item-type>
+               <item-type>Number:Dimensionless</item-type>
                <label>CO2 concentration</label>
                <description>A CO2 sensor carbon dioxide concentration in ppm</description>
                <state readOnly="true" pattern="%d %unit%"/>
        </channel-type>
 
        <channel-type id="noise">
-               <item-type>Number:DimensionLess</item-type>
+               <item-type>Number:Dimensionless</item-type>
                <label>Noise</label>
                <description>A noise sensor noise in decibel</description>
                <state readOnly="true" pattern="%d %unit%"/>
index 36e30a756a3e1a06e964dc82041540bdfc2df96f..7a6e4057f2fd3911a4f805beaa23de112db48a08 100644 (file)
@@ -73,7 +73,6 @@ public class SonyProjectorDiscoveryParticipant implements SddpDiscoveryParticipa
         if (device.manufacturer.toUpperCase(Locale.ENGLISH).contains(SONY)
                 && device.type.toUpperCase(Locale.ENGLISH).contains(TYPE_PROJECTOR) && !device.macAddress.isBlank()
                 && !device.ipAddress.isBlank()) {
-
             logger.debug("Sony projector with mac {} found at {}", device.macAddress, device.ipAddress);
             return new ThingUID(THING_TYPE_ETHERNET, device.macAddress);
         }
index 438277ace57dfb4708a369e1407f3c0b68c4dc77..62a1101a838023dbd4774ed95bc13490b69d5e6d 100644 (file)
@@ -39,7 +39,6 @@ public class SynopLand extends Synop {
                     }
                 } catch (NumberFormatException ignore) {
                 }
-
             }
         }
     }
index b40d3134a4a221b7f93c41c998d64e679030b8c5..d0e2d11da8d63410490917defb3d7c2f81263ff4 100644 (file)
@@ -44,7 +44,6 @@ public enum WindDirections {
      * Returns the wind direction based on degree.
      */
     public static WindDirections getWindDirection(int degree) {
-
         double b = Math.floor((degree + (STEP / 2.0)) / STEP);
         return values()[(int) (b % values().length)];
     }
index abd3cb718bdc7b39e8a2ed6690e329e3add28180..995fe8a65aa101ce1f613c299e70f67204a0a63e 100644 (file)
@@ -130,7 +130,6 @@ public class TACmiCoEBridgeHandler extends BaseBridgeHandler {
                     }
                     updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
                             "Error processing data: " + e.getMessage());
-
                 } catch (RuntimeException e) {
                     // we catch runtime exceptions here to prevent the receiving thread to stop accidentally if
                     // something like an IllegalStateException or NumberFormatExceptions are thrown. This indicates a
index 30b6a81722e542843139d21e4964a148a9d39c07..fb215715178bea642ccc8d566959dda93dc73116 100644 (file)
@@ -19,7 +19,7 @@ import org.openhab.binding.tacmi.internal.TACmiMeasureType;
  * This class handles analog values as used in the analog message.
  *
  * @author Timo Wendt - Initial contribution
- * @author Wolfgang Klimt
+ * @author Wolfgang Klimt - Improvements
  * @author Christian Niessner - Ported to OpenHAB2
  */
 @NonNullByDefault
index 181b777112e8477ef0a7da1608171f98ee9bdce7..5eee242ad15a7a5b4827e17ae7b5adb8f47bf192 100644 (file)
@@ -61,7 +61,6 @@ public class HomeApi {
     }
 
     public void deleteZoneOverlay(Long homeId, Long zoneId) throws IOException, ApiException {
-
         // verify the required parameter 'homeId' is set
         if (homeId == null) {
             throw new ApiException(400, "Missing the required parameter 'homeId' when calling deleteZoneOverlay");
@@ -103,7 +102,6 @@ public class HomeApi {
     }
 
     public HomeState homeState(Long homeId) throws IOException, ApiException {
-
         // verify the required parameter 'homeId' is set
         if (homeId == null) {
             throw new ApiException(400, "Missing the required parameter 'homeId' when calling homeState");
@@ -142,7 +140,6 @@ public class HomeApi {
     }
 
     public List<MobileDevice> listMobileDevices(Long homeId) throws IOException, ApiException {
-
         // verify the required parameter 'homeId' is set
         if (homeId == null) {
             throw new ApiException(400, "Missing the required parameter 'homeId' when calling listMobileDevices");
@@ -181,7 +178,6 @@ public class HomeApi {
     }
 
     public List<Zone> listZones(Long homeId) throws IOException, ApiException {
-
         // verify the required parameter 'homeId' is set
         if (homeId == null) {
             throw new ApiException(400, "Missing the required parameter 'homeId' when calling listZones");
@@ -220,7 +216,6 @@ public class HomeApi {
     }
 
     public HomeInfo showHome(Long homeId) throws IOException, ApiException {
-
         // verify the required parameter 'homeId' is set
         if (homeId == null) {
             throw new ApiException(400, "Missing the required parameter 'homeId' when calling showHome");
@@ -259,7 +254,6 @@ public class HomeApi {
     }
 
     public User showUser() throws IOException, ApiException {
-
         startHttpClient(CLIENT);
 
         // create path and map variables
@@ -293,7 +287,6 @@ public class HomeApi {
     }
 
     public GenericZoneCapabilities showZoneCapabilities(Long homeId, Long zoneId) throws IOException, ApiException {
-
         // verify the required parameter 'homeId' is set
         if (homeId == null) {
             throw new ApiException(400, "Missing the required parameter 'homeId' when calling showZoneCapabilities");
@@ -339,7 +332,6 @@ public class HomeApi {
     }
 
     public OverlayTemplate showZoneDefaultOverlay(Long homeId, Long zoneId) throws IOException, ApiException {
-
         // verify the required parameter 'homeId' is set
         if (homeId == null) {
             throw new ApiException(400, "Missing the required parameter 'homeId' when calling showZoneDefaultOverlay");
@@ -385,7 +377,6 @@ public class HomeApi {
     }
 
     public Zone showZoneDetails(Long homeId, Long zoneId) throws IOException, ApiException {
-
         // verify the required parameter 'homeId' is set
         if (homeId == null) {
             throw new ApiException(400, "Missing the required parameter 'homeId' when calling showZoneDetails");
@@ -431,7 +422,6 @@ public class HomeApi {
     }
 
     public Overlay showZoneOverlay(Long homeId, Long zoneId) throws IOException, ApiException {
-
         // verify the required parameter 'homeId' is set
         if (homeId == null) {
             throw new ApiException(400, "Missing the required parameter 'homeId' when calling showZoneOverlay");
@@ -477,7 +467,6 @@ public class HomeApi {
     }
 
     public ZoneState showZoneState(Long homeId, Long zoneId) throws IOException, ApiException {
-
         // verify the required parameter 'homeId' is set
         if (homeId == null) {
             throw new ApiException(400, "Missing the required parameter 'homeId' when calling showZoneState");
@@ -522,7 +511,6 @@ public class HomeApi {
     }
 
     public void updatePresenceLock(Long homeId, HomePresence json) throws IOException, ApiException {
-
         // verify the required parameter 'homeId' is set
         if (homeId == null) {
             throw new ApiException(400, "Missing the required parameter 'homeId' when calling updatePresenceLock");
@@ -565,7 +553,6 @@ public class HomeApi {
     }
 
     public Overlay updateZoneOverlay(Long homeId, Long zoneId, Overlay json) throws IOException, ApiException {
-
         // verify the required parameter 'homeId' is set
         if (homeId == null) {
             throw new ApiException(400, "Missing the required parameter 'homeId' when calling updateZoneOverlay");
index 3f5243ea31825680b766733bfbafd1df0d456787..2638292ae097dca638e0ba3712753bfddd745deb 100755 (executable)
@@ -105,7 +105,7 @@ Channel availability depends on the electricity connection (single or three-phas
 | bbrhpjw  | `Number:Energy`           | Total consumed energy at high rate pricing on white days | All    | Tempo |
 | bbrhcjr  | `Number:Energy`           | Total consumed energy at low rate pricing on red days    | All    | Tempo |
 | bbrhpjr  | `Number:Energy`           | Total consumed energy at high rate pricing on red days   | All    | Tempo |
-| pejp     | `Number:Duration`         | Prior notice to EJP start                                | All    | EJP   |
+| pejp     | `Number:Time`             | Prior notice to EJP start                                | All    | EJP   |
 | demain   | `String`                  | Following day color                                      | All    | Tempo |
 
 ### Standard TIC mode
index 05a505b98f6e7de004a2c6327b1caedf924079f0..203d6a8daf241f579632832527666faaedca9fd8 100644 (file)
@@ -93,7 +93,6 @@ public class VeluxBinding extends VeluxBridgeConfiguration {
             this.isBulkRetrievalEnabled = uncheckedConfiguration.isBulkRetrievalEnabled;
             this.isSequentialEnforced = uncheckedConfiguration.isSequentialEnforced;
             this.isProtocolTraceEnabled = uncheckedConfiguration.isProtocolTraceEnabled;
-
         }
         logger.trace("VeluxBinding(constructor) done.");
     }
index f60e581f8301cd644872956927a43c06dac4293f..a083a5eb656ebc2a7078362bb4edc523adff042a 100644 (file)
@@ -131,7 +131,7 @@ public class VigiCruesHandler extends BaseThingHandler {
         try {
             HubEauResponse stationDetails = apiHandler.discoverStations(config.id);
             List<StationData> stations = stationDetails.stations;
-            if (stations != null && stations.size() > 0) {
+            if (stations != null && !stations.isEmpty()) {
                 stationDetails.stations.stream().findFirst().ifPresent(station -> {
                     PointType stationLocation = new PointType(
                             String.format(Locale.US, "%f,%f", station.latitudeStation, station.longitudeStation));
index 8f24072066ff08e1abb4440daa2db423ce9ac7b4..bcda957d91e4f8d16a2740e94d814fb10c7f72e0 100644 (file)
@@ -67,7 +67,7 @@ public class DescriptionLoader {
             }
             var body = response.getContentAsString();
             var description = gson.fromJson(body, WebThingDescription.class);
-            if ((description != null) && (description.properties != null) && (description.properties.size() > 0)) {
+            if ((description != null) && (description.properties != null) && !description.properties.isEmpty()) {
                 if ((description.contextKeyword == null) || description.contextKeyword.trim().length() == 0) {
                     description.contextKeyword = "https://webthings.io/schemas";
                 }
index 99e60f1f7a83a6cd4dcf63d23169a039dc095022..885b33e9335add2b5e3e89cfe618428ee115f380 100644 (file)
@@ -30,8 +30,8 @@ import org.slf4j.LoggerFactory;
  * Abstract WiFi LED driver.
  *
  * @author Osman Basha - Initial contribution
- * @author Stefan Endrullis
- * @author Ries van Twisk
+ * @author Stefan Endrullis - Improvements
+ * @author Ries van Twisk - Improvements
  */
 public abstract class AbstractWiFiLEDDriver {
 
index 7fa02c612bc121fd76193c64d5a2f30c1b4b7329..9da4bbb27a327cefc7556965b06e9f253b56cae3 100644 (file)
@@ -28,7 +28,7 @@ import org.openhab.core.library.types.StringType;
  * It's used for sending color or program settings and also extracting the data out of the received telegrams.
  *
  * @author Osman Basha - Initial contribution
- * @author Stefan Endrullis
+ * @author Stefan Endrullis - Improvements
  * @author Ries van Twisk - Prevent flashes during classic driver color + white updates
  */
 public class ClassicWiFiLEDDriver extends AbstractWiFiLEDDriver {
index 6aa63391708067ecf076b2213946132a98f9b595..4391693624dd067974dc8d57393f2b004384db67 100644 (file)
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
  * It utilizes color fading when changing colors or turning the light on of off.
  *
  * @author Stefan Endrullis - Initial contribution
- * @author Ries van Twisk
+ * @author Ries van Twisk - Improvements
  */
 public class FadingWiFiLEDDriver extends AbstractWiFiLEDDriver {
 
index a1eb9febc914ee41cba9c69135045ec4fc2060b0..b5ff20f76a92d2a62806d3d832c13e21e807d143 100644 (file)
@@ -40,7 +40,7 @@ import org.slf4j.LoggerFactory;
  * sent to one of the channels.
  *
  * @author Osman Basha - Initial contribution
- * @author Ries van Twisk
+ * @author Ries van Twisk - Improvements
  */
 public class WiFiLEDHandler extends BaseThingHandler {
 
index 594d7dbb7342353cff297e39670b6cc2b8ae7ff5..3238e6639487fa75901f8eb63798e8e7cfb92aa6 100644 (file)
@@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Test for LEDStateDTO
  *
- * @author Ries van Twisk - Prevent flashes during classic driver color + white updates
+ * @author Ries van Twisk - Initial contribution, prevent flashes during classic driver color + white updates
  */
 public class LEDStateDTOTest {
 
index 33c002408d360d4f6910c20a056b72723ba5f50d..afd53cf7d0dba18c09a98bdc7f2a9487fe7f75c6 100644 (file)
@@ -113,7 +113,6 @@ public class DeviceInformationXML implements DeviceInformation {
 
             XMLConstants.FEATURE_BY_YNC_TAG
                     .forEach((name, feature) -> checkFeature(featureNode, name, feature, state.features));
-
         } else {
             // on older models (RX-V3900) the Feature_Existence element does not exist
 
index 3d396cde4dcffdd7ed0088153ce6500b0eeae4fc..a89081ae36f02bf5f7bee2cbac3456793ff5834d 100644 (file)
@@ -41,7 +41,8 @@ import org.w3c.dom.Node;
  * No state will be saved in here, but in {@link DabBandState}, {@link PresetInfoState} and {@link PlayInfoState}
  * instead.
  *
- * @author Tomasz Maruszak - [yamaha] Tuner band selection and preset feature for dual band models (RX-S601D)
+ * @author Tomasz Maruszak - Initial contribution, [yamaha] Tuner band selection and preset feature for dual band models
+ *         (RX-S601D)
  */
 public class InputWithTunerDABControlXML extends AbstractInputControlXML
         implements InputWithTunerBandControl, InputWithPresetControl {
index e32f0de01486cff05368580e39f7a000ee0c56ea..c3274199ba0e20bad59112819cdc3def2e37ae00 100644 (file)
@@ -93,7 +93,6 @@ public class XMLConnection extends AbstractConnection {
             }
 
             return responseConsumer.apply(connection);
-
         } finally {
             if (connection != null) {
                 connection.disconnect();
index 801ed5ea2ce0b671e0f282af5f999d3f16b4fe71..f1c2924c90d2b3e33ea5a0ce58478d515d49f02e 100644 (file)
@@ -39,11 +39,11 @@ import org.w3c.dom.Node;
  * The zone protocol class is used to control one zone of a Yamaha receiver with HTTP/xml.
  * No state will be saved in here, but in {@link ZoneControlState} instead.
  *
+ * @author Tomasz Maruszak - Initial contribution, refactoring, input mapping fix, added
+ *         Straight surround, volume DB fix and config improvement.
  * @author David Gräff - Refactored
- * @author Eric Thill
- * @author Ben Jones
- * @author Tomasz Maruszak - Refactoring, input mapping fix, added Straight surround, volume DB fix and config
- *         improvement.
+ * @author Eric Thill - Unknown
+ * @author Ben Jones - Unknown
  */
 public class ZoneControlXML implements ZoneControl {
 
@@ -157,7 +157,6 @@ public class ZoneControlXML implements ZoneControl {
                         "Surr/Pgm_Sel/Straight");
                 logger.debug("Zone {} - adjusting command to: {}", getZone(), surroundSelStraight);
             }
-
         } catch (ReceivedMessageParseException | IOException e) {
             logger.debug("Could not perform feature detection for RX-V3900");
         }
index d785b99d3bdb689cdfab695db64e9d16be8142a7..d850ae27adeff5fb4290d4c4fb6f4f173084c52d 100644 (file)
@@ -17,7 +17,8 @@ import static org.openhab.binding.yamahareceiver.internal.YamahaReceiverBindingC
 /**
  * The band state for DAB tuners.
  *
- * @author Tomasz Maruszak - [yamaha] Tuner band selection and preset feature for dual band models (RX-S601D)
+ * @author Tomasz Maruszak - Initial contribution, [yamaha] Tuner band selection and preset feature for dual band models
+ *         (RX-S601D)
  */
 public class DabBandState implements Invalidateable {
 
index 565f935f0cf9c9cffc3473c3ba346ccb13c27d2d..871762557f8ed96ca4e2ed68deb0745b579b1eb1 100644 (file)
@@ -15,7 +15,8 @@ package org.openhab.binding.yamahareceiver.internal.state;
 /**
  * Listener for changes to {@link DabBandState}
  *
- * @author Tomasz Maruszak - [yamaha] Tuner band selection and preset feature for dual band models (RX-S601D)
+ * @author Tomasz Maruszak - Initial contribution, [yamaha] Tuner band selection and preset feature for dual band models
+ *         (RX-S601D)
  */
 public interface DabBandStateListener {
     void dabBandUpdated(DabBandState msg);
index f857a18cfc8337c503ec3bfbc65879430b70c2a0..a70d221f0bf83ce9fff208a196f8d664d63caa6a 100644 (file)
@@ -15,7 +15,8 @@ package org.openhab.binding.yamahareceiver.internal.state;
 /**
  * Represent object whose state can be invalidated.
  *
- * @author Tomasz Maruszak - [yamaha] Tuner band selection and preset feature for dual band models (RX-S601D)
+ * @author Tomasz Maruszak - Initial contribution, [yamaha] Tuner band selection and preset feature for dual band models
+ *         (RX-S601D)
  */
 public interface Invalidateable {
 
index e482a1ba58afeca5656b5d3bbd22e719039c7563..a099bc0e6b1734ca7d0ffabd1e9a7bca2794e29f 100644 (file)
@@ -55,7 +55,7 @@ import org.slf4j.LoggerFactory;
 @NonNullByDefault
 public class StateFilterProfile implements StateProfile {
 
-    private final static String OPERATOR_NAME_PATTERN = Stream.of(StateCondition.ComparisonType.values())
+    private static final String OPERATOR_NAME_PATTERN = Stream.of(StateCondition.ComparisonType.values())
             .map(StateCondition.ComparisonType::name)
             // We want to match the longest operator first, e.g. `GTE` before `GT`
             .sorted(Comparator.comparingInt(String::length).reversed())
@@ -63,13 +63,13 @@ public class StateFilterProfile implements StateProfile {
             // so we can have conditions against input data without needing a leading space, e.g. `GTE 0`
             .collect(Collectors.joining("|", "(?:(?<=\\S)\\s+|^\\s*)(?:", ")\\s"));
 
-    private final static String OPERATOR_SYMBOL_PATTERN = Stream.of(StateCondition.ComparisonType.values())
+    private static final String OPERATOR_SYMBOL_PATTERN = Stream.of(StateCondition.ComparisonType.values())
             .map(StateCondition.ComparisonType::symbol)
             // We want to match the longest operator first, e.g. `<=` before `<`
             .sorted(Comparator.comparingInt(String::length).reversed()) //
             .collect(Collectors.joining("|", "(?:", ")"));
 
-    private final static Pattern EXPRESSION_PATTERN = Pattern.compile(
+    private static final Pattern EXPRESSION_PATTERN = Pattern.compile(
             // - Without the non-greedy operator in the first capture group,
             // it will match `Item<` when encountering `Item<>X` condition
             // - Symbols may be more prevalently used, so check them first
index e803b602aa9a3fcd1b7d9077d7262db5db836e2f..9b3d5fe368bec8a7fee0e95c4dc496bf9365f1b7 100644 (file)
@@ -47,8 +47,18 @@ import org.openhab.core.items.GenericItem;
 import org.openhab.core.items.Item;
 import org.openhab.core.items.ItemNotFoundException;
 import org.openhab.core.items.ItemRegistry;
-import org.openhab.core.library.items.*;
-import org.openhab.core.library.types.*;
+import org.openhab.core.library.items.ContactItem;
+import org.openhab.core.library.items.DimmerItem;
+import org.openhab.core.library.items.NumberItem;
+import org.openhab.core.library.items.RollershutterItem;
+import org.openhab.core.library.items.StringItem;
+import org.openhab.core.library.items.SwitchItem;
+import org.openhab.core.library.types.DecimalType;
+import org.openhab.core.library.types.OnOffType;
+import org.openhab.core.library.types.OpenClosedType;
+import org.openhab.core.library.types.PercentType;
+import org.openhab.core.library.types.QuantityType;
+import org.openhab.core.library.types.StringType;
 import org.openhab.core.library.unit.SIUnits;
 import org.openhab.core.thing.link.ItemChannelLink;
 import org.openhab.core.thing.profiles.ProfileCallback;
@@ -178,14 +188,16 @@ public class StateFilterProfileTest {
         return item;
     }
 
-    private Item numberItemWithState(String itemType, String itemName, State value) {
-        NumberItem item = new NumberItem(itemType, itemName, null);
-        item.setState(value);
-        return item;
-    }
+    /*
+     * private Item numberItemWithState(String itemType, String itemName, State value) {
+     * NumberItem item = new NumberItem(itemType, itemName, null);
+     * item.setState(value);
+     * return item;
+     * }
+     */
 
     @Test
-    public void testMultipleCondition_AllMatch() throws ItemNotFoundException {
+    public void testMultipleConditionAllMatch() throws ItemNotFoundException {
         when(mockContext.getConfiguration())
                 .thenReturn(new Configuration(Map.of("conditions", "ItemName eq 'Value', ItemName2 eq 'Value2'")));
         when(mockItemRegistry.getItem("ItemName")).thenReturn(stringItemWithState("ItemName", "Value"));
@@ -199,7 +211,7 @@ public class StateFilterProfileTest {
     }
 
     @Test
-    public void testMultipleCondition_SingleMatch() throws ItemNotFoundException {
+    public void testMultipleConditionSingleMatch() throws ItemNotFoundException {
         when(mockContext.getConfiguration())
                 .thenReturn(new Configuration(Map.of("conditions", "ItemName eq Value, ItemName2 eq Value2")));
         when(mockItemRegistry.getItem("ItemName")).thenReturn(stringItemWithState("ItemName", "Value"));
@@ -266,7 +278,7 @@ public class StateFilterProfileTest {
         StringType s_foo = StringType.valueOf("foo");
         StringType s_NULL = StringType.valueOf("NULL");
         StringType s_UNDEF = StringType.valueOf("UNDEF");
-        StringType s_OPEN = StringType.valueOf("OPEN");
+        // StringType s_OPEN = StringType.valueOf("OPEN");
 
         return Stream.of( //
                 // We should be able to check item state is/isn't UNDEF/NULL
@@ -595,7 +607,6 @@ public class StateFilterProfileTest {
     @MethodSource
     public void testComparingInputStateWithValue(GenericItem linkedItem, State inputState, String operator,
             String value, boolean expected) throws ItemNotFoundException {
-
         String linkedItemName = linkedItem.getName();
 
         when(mockContext.getConfiguration()).thenReturn(new Configuration(Map.of("conditions", operator + value)));
index 0e5f3afd0e34953d349f204b649a8c025e9faffa..defd84e3e779baa0cdd780080ba49fcb64d83c1d 100644 (file)
@@ -83,9 +83,7 @@ public class GoogleTTSVoice implements Voice {
         return this.label;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    // automatically inherit doc
     @Override
     public Locale getLocale() {
         return this.locale;
index e26d9dbda7d9797b2767b77a88a842c6679cb753..a5cbf6f8e41ba85c3aa6213b7bc2d126ee17c7da 100644 (file)
@@ -39,9 +39,9 @@ import org.slf4j.LoggerFactory;
  * This is a TTS service implementation for Mac OS, which simply uses the "say" command from the OS.
  *
  * @author Kai Kreuzer - Initial contribution and API
- * @author Pauli Antilla
- * @author Kelly Davis
- * @author Laurent Garnier : Implement TTS LRU cache
+ * @author Pauli Antilla - Improvements
+ * @author Kelly Davis - Improvements
+ * @author Laurent Garnier - Implement TTS LRU cache
  */
 @Component(service = TTSService.class)
 @NonNullByDefault
index 5e3f91baef1fe7610121326ce501b792d0cd5904..6405c67627e7f04a04e6e0bc96e63a7b757be5f1 100644 (file)
@@ -65,9 +65,7 @@ public class MaryTTSVoice implements Voice {
         return label;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    // automatically inherit doc
     @Override
     public Locale getLocale() {
         return locale;
index 83830485daf20fcdd5c3f08b5fba76d015e806cd..a68c1fdf6a4620381f03f64542b076f1277ea960 100644 (file)
@@ -66,9 +66,7 @@ public class PollyTTSVoice implements Voice {
         return label;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    // automatically inherit doc
     @Override
     public Locale getLocale() {
         return locale;
index d771f9677a942a23b514bf283a17765f04276213..15c3dee9ec85eac55b7531d6aa8fabd259ba30ff 100644 (file)
@@ -74,9 +74,7 @@ public class VoiceRSSVoice implements Voice {
         return label;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    // automatically inherit doc
     @Override
     public Locale getLocale() {
         return locale;
index 23e1992f1379529efe2c5ae2ef572efa7b577ce1..b1a91fea1f6f7a61944c643026a8974906c2755e 100644 (file)
@@ -105,6 +105,7 @@ public class NtpOSGiTest extends JavaOSGiTest {
     private static final String ACCEPTED_ITEM_TYPE_DATE_TIME = "DateTime";
     private static final String TEST_HOSTNAME = "127.0.0.1";
     private static final int TEST_PORT = 9002;
+    private static final String WRONG_HOSTNAME = "wrong.hostname";
     static SimpleNTPServer timeServer;
     private ChannelTypeUID channelTypeUID;
 
@@ -465,7 +466,6 @@ public class NtpOSGiTest extends JavaOSGiTest {
 
     private void assertCommunicationError(String acceptedItemType) {
         Configuration configuration = new Configuration();
-        final String WRONG_HOSTNAME = "wrong.hostname";
         if (acceptedItemType.equals(ACCEPTED_ITEM_TYPE_DATE_TIME)) {
             initialize(configuration, NtpBindingConstants.CHANNEL_DATE_TIME, ACCEPTED_ITEM_TYPE_DATE_TIME, null,
                     WRONG_HOSTNAME);