]> git.basschouten.com Git - openhab-addons.git/commitdiff
Reduce SAT warnings (#15090)
authorHolger Friedrich <holgerfriedrich@users.noreply.github.com>
Wed, 14 Jun 2023 22:02:10 +0000 (00:02 +0200)
committerGitHub <noreply@github.com>
Wed, 14 Jun 2023 22:02:10 +0000 (00:02 +0200)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
23 files changed:
bundles/org.openhab.binding.alarmdecoder/src/main/java/org/openhab/binding/alarmdecoder/internal/handler/ADThingHandler.java
bundles/org.openhab.binding.alarmdecoder/src/main/java/org/openhab/binding/alarmdecoder/internal/protocol/KeypadMessage.java
bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/WebSocketConnection.java
bundles/org.openhab.binding.bluetooth.radoneye/src/main/java/org/openhab/binding/bluetooth/radoneye/internal/RadoneyeDiscoveryParticipant.java
bundles/org.openhab.binding.lutron/src/main/java/org/openhab/binding/lutron/internal/grxprg/GrafikEyeHandler.java
bundles/org.openhab.binding.lutron/src/main/java/org/openhab/binding/lutron/internal/grxprg/PrgBridgeHandler.java
bundles/org.openhab.binding.miio/README.base.md
bundles/org.openhab.binding.miio/README.md
bundles/org.openhab.binding.modbus.sunspec/src/main/java/org/openhab/binding/modbus/sunspec/internal/discovery/SunspecDiscoveryProcess.java
bundles/org.openhab.binding.modbus.sunspec/src/main/java/org/openhab/binding/modbus/sunspec/internal/handler/AbstractSunSpecHandler.java
bundles/org.openhab.binding.modbus.sunspec/src/main/java/org/openhab/binding/modbus/sunspec/internal/parser/CommonModelParser.java
bundles/org.openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/protocol/QbusMessageDeserializer.java
bundles/org.openhab.binding.sensorcommunity/src/main/java/org/openhab/binding/sensorcommunity/internal/handler/HTTPHandler.java
bundles/org.openhab.binding.sensorcommunity/src/main/java/org/openhab/binding/sensorcommunity/internal/utils/DateTimeUtils.java
bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/api2/Shelly2ApiClient.java
bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/discovery/ShellyDiscoveryParticipant.java
bundles/org.openhab.binding.solarwatt/README.md
bundles/org.openhab.binding.sonnen/src/main/java/org/openhab/binding/sonnen/internal/SonnenHandler.java
bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/schema/ApiPageParser.java
bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/schema/ChangerX2Parser.java
bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/constants/TapoErrorCode.java
bundles/org.openhab.binding.wundergroundupdatereceiver/src/test/java/org/openhab/binding/wundergroundupdatereceiver/internal/WundergroundUpdateReceiverDiscoveryServiceTest.java
itests/org.openhab.binding.modbus.tests/src/main/java/org/openhab/binding/modbus/tests/ModbusPollerThingHandlerTest.java

index 37c5c9c2365ebcdd31c6a20ea9784b0eeb2dacc3..9c9ca20df9315f4e14fa9506424cda6e55eab654 100644 (file)
@@ -85,7 +85,6 @@ public abstract class ADThingHandler extends BaseThingHandler {
         if (bridgeStatus == ThingStatus.ONLINE
                 && getThing().getStatusInfo().getStatusDetail() == ThingStatusDetail.BRIDGE_OFFLINE) {
             initDeviceState();
-
         } else if (bridgeStatus == ThingStatus.OFFLINE) {
             updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_OFFLINE);
         }
index 66300987f09f806e9dd0c5291bff87512f210dcf..cb9cad16efae3e8b1db4111572c249084214796a 100644 (file)
@@ -82,7 +82,6 @@ public class KeypadMessage extends ADMessage {
             this.nbeeps = Integer.parseInt(parts.get(0).substring(6, 7));
             this.lower = Integer.parseInt(parts.get(0).substring(7, 17), 2);
             this.status = ((upper & 0x1F) << 13) | ((nbeeps & 0x3) << 10) | lower;
-
         } catch (NumberFormatException e) {
             throw new IllegalArgumentException("keypad msg contains invalid number: " + e.getMessage(), e);
         }
index 53aad2b4a5a3289335ecc18b736323661af3b6d6..2f3346460bc243b62bae7aa13f649350baf15ed1 100644 (file)
@@ -488,7 +488,6 @@ public class WebSocketConnection {
                     sum += toUnsignedInt((data[index] & 0xFF) << ((index & 3 ^ 3) << 3));
                     overflow += computeBits(sum, 32);
                     sum = toUnsignedInt((int) sum & (int) 4294967295L);
-
                 } else {
                     index = exclusionEnd - 1;
                 }
index decf69417ae3b1b080d5deb35b8b766166203557..f1c911f859a15f86010147e8cbbf9a0651ff90b8 100644 (file)
@@ -80,10 +80,7 @@ public class RadoneyeDiscoveryParticipant implements BluetoothDiscoveryParticipa
 
     private boolean isRadoneyeDevice(BluetoothDiscoveryDevice device) {
         String manufacturerMacId = device.getAddress().toString().toLowerCase().replace(":", "").substring(0, 6);
-        if (manufacturerMacId.equals(RADONEYE_BLUETOOTH_COMPANY_ID.toLowerCase())) {
-            return true;
-        }
-        return false;
+        return manufacturerMacId.equals(RADONEYE_BLUETOOTH_COMPANY_ID.toLowerCase());
     }
 
     private String getSerial(BluetoothDiscoveryDevice device) {
@@ -120,7 +117,6 @@ public class RadoneyeDiscoveryParticipant implements BluetoothDiscoveryParticipa
         Map<String, Object> properties = new HashMap<>();
         properties.put(BluetoothBindingConstants.CONFIGURATION_ADDRESS, device.getAddress().toString());
         properties.put(Thing.PROPERTY_VENDOR, "RadonEye");
-        String name = device.getName();
         String serialNumber = device.getSerialNumber();
         String firmwareRevision = device.getFirmwareRevision();
         String model = device.getModel();
index ad3de6fac92f37726514b67d6903d4249992930c..9a735f20dc6bbc856f7be2958332ba27e2961e7d 100644 (file)
@@ -112,49 +112,42 @@ public class GrafikEyeHandler extends BaseThingHandler {
             } else {
                 logger.error("Received a SCENE command with a non DecimalType: {}", command);
             }
-
         } else if (id.equals(PrgConstants.CHANNEL_SCENELOCK)) {
             if (command instanceof OnOffType) {
                 getProtocolHandler().setSceneLock(config.getControlUnit(), command == OnOffType.ON);
             } else {
                 logger.error("Received a SCENELOCK command with a non OnOffType: {}", command);
             }
-
         } else if (id.equals(PrgConstants.CHANNEL_SCENESEQ)) {
             if (command instanceof OnOffType) {
                 getProtocolHandler().setSceneSequence(config.getControlUnit(), command == OnOffType.ON);
             } else {
                 logger.error("Received a SCENESEQ command with a non OnOffType: {}", command);
             }
-
         } else if (id.equals(PrgConstants.CHANNEL_ZONELOCK)) {
             if (command instanceof OnOffType) {
                 getProtocolHandler().setZoneLock(config.getControlUnit(), command == OnOffType.ON);
             } else {
                 logger.error("Received a ZONELOCK command with a non OnOffType: {}", command);
             }
-
         } else if (id.startsWith(PrgConstants.CHANNEL_ZONELOWER)) {
             final Integer zone = getTrailingNbr(id, PrgConstants.CHANNEL_ZONELOWER);
 
             if (zone != null) {
                 getProtocolHandler().setZoneLower(config.getControlUnit(), zone);
             }
-
         } else if (id.startsWith(PrgConstants.CHANNEL_ZONERAISE)) {
             final Integer zone = getTrailingNbr(id, PrgConstants.CHANNEL_ZONERAISE);
 
             if (zone != null) {
                 getProtocolHandler().setZoneRaise(config.getControlUnit(), zone);
             }
-
         } else if (id.equals(PrgConstants.CHANNEL_ZONEFADE)) {
             if (command instanceof DecimalType) {
                 setFade(((DecimalType) command).intValue());
             } else {
                 logger.error("Received a ZONEFADE command with a non DecimalType: {}", command);
             }
-
         } else if (id.startsWith(PrgConstants.CHANNEL_ZONEINTENSITY)) {
             final Integer zone = getTrailingNbr(id, PrgConstants.CHANNEL_ZONEINTENSITY);
 
@@ -172,7 +165,6 @@ public class GrafikEyeHandler extends BaseThingHandler {
                     logger.error("Received a ZONEINTENSITY command with a non DecimalType: {}", command);
                 }
             }
-
         } else if (id.startsWith(PrgConstants.CHANNEL_ZONESHADE)) {
             final Integer zone = getTrailingNbr(id, PrgConstants.CHANNEL_ZONESHADE);
 
@@ -190,7 +182,6 @@ public class GrafikEyeHandler extends BaseThingHandler {
                     logger.error("Received a ZONEINTENSITY command with a non DecimalType: {}", command);
                 }
             }
-
         } else {
             logger.error("Unknown/Unsupported Channel id: {}", id);
         }
@@ -209,7 +200,6 @@ public class GrafikEyeHandler extends BaseThingHandler {
 
         if (id.equals(PrgConstants.CHANNEL_SCENE)) {
             getProtocolHandler().refreshScene();
-
         } else if (id.equals(PrgConstants.CHANNEL_ZONEINTENSITY)) {
             getProtocolHandler().refreshZoneIntensity(config.getControlUnit());
         } else if (id.equals(PrgConstants.CHANNEL_ZONEFADE)) {
index a20e41e7a2f2fd51fc7ad1f2beef79fda3390074..b5421716ca9fa7522a51fcf6debd3f004e52b7eb 100644 (file)
@@ -162,10 +162,8 @@ public class PrgBridgeHandler extends BaseBridgeHandler {
 
         if (id.equals(PrgConstants.CHANNEL_ZONELOWERSTOP)) {
             protocolHandler.setZoneLowerStop();
-
         } else if (id.equals(PrgConstants.CHANNEL_ZONERAISESTOP)) {
             protocolHandler.setZoneRaiseStop();
-
         } else if (id.equals(PrgConstants.CHANNEL_TIMECLOCK)) {
             if (command instanceof DateTimeType) {
                 final ZonedDateTime zdt = ((DateTimeType) command).getZonedDateTime();
@@ -180,15 +178,12 @@ public class PrgBridgeHandler extends BaseBridgeHandler {
             } else {
                 logger.error("Received a SCHEDULE channel command with a non DecimalType: {}", command);
             }
-
         } else if (id.startsWith(PrgConstants.CHANNEL_SUPERSEQUENCESTART)) {
             protocolHandler.startSuperSequence();
-
         } else if (id.startsWith(PrgConstants.CHANNEL_SUPERSEQUENCEPAUSE)) {
             protocolHandler.pauseSuperSequence();
         } else if (id.startsWith(PrgConstants.CHANNEL_SUPERSEQUENCERESUME)) {
             protocolHandler.resumeSuperSequence();
-
         } else {
             logger.error("Unknown/Unsupported Channel id: {}", id);
         }
@@ -207,16 +202,12 @@ public class PrgBridgeHandler extends BaseBridgeHandler {
 
         if (id.equals(PrgConstants.CHANNEL_TIMECLOCK)) {
             protocolHandler.refreshTime();
-
         } else if (id.equals(PrgConstants.CHANNEL_SCHEDULE)) {
             protocolHandler.refreshSchedule();
-
         } else if (id.equals(PrgConstants.CHANNEL_SUNRISE)) {
             protocolHandler.refreshSunriseSunset();
-
         } else if (id.equals(PrgConstants.CHANNEL_SUNSET)) {
             protocolHandler.refreshSunriseSunset();
-
         } else if (id.equals(PrgConstants.CHANNEL_SUPERSEQUENCESTATUS)) {
             protocolHandler.reportSuperSequenceStatus();
         } else if (id.equals(PrgConstants.CHANNEL_SUPERSEQUENCENEXTSTEP)) {
@@ -277,7 +268,6 @@ public class PrgBridgeHandler extends BaseBridgeHandler {
                     return;
                 }
             }
-
         } catch (Exception e) {
             logger.error("Exception during connection attempt", e);
         }
index d27e33a97b19f3df00e87a603b49e0fff4c19083..155d0eb4e6e31cf44573ff9e58abc78d7ee86ae6 100644 (file)
@@ -109,6 +109,7 @@ However, many devices share large similarities with existing devices.
 The binding allows to try/test if your new device is working with database files of older devices as well.
 
 There are 3 ways to get unsupported devices working:
+
 - by overriding the model with the model of a similar supported device. E.g. this works great for roborock vacuum devices and yeelight devices). See [Substitute model for unsupported devices](#substitute-model-for-unsupported-devices)
 - by switching on the `(experimental) Create channels for new/unsupported devices (MIOT protocol)` channel, this works for most newer devices. See [Create support for new devices based on online published spec database](#create-support-for-new-devices-based-on-online-published-spec-database)
 - by switching on the `(experimental) Create channels / test properties for unsupported devices (legacy protocol)` channel. This works for older / legacy devices. It test all known properties to see which are supported by your device. See [Supported property test for unsupported devices](#supported-property-test-for-unsupported-devices)
index 769ed6d716e184b30b15cf3bb9f0c0687f6c4311..e963ff82b5ca9bc53ac577b91b239ee4f3252f53 100644 (file)
@@ -109,6 +109,7 @@ However, many devices share large similarities with existing devices.
 The binding allows to try/test if your new device is working with database files of older devices as well.
 
 There are 3 ways to get unsupported devices working:
+
 - by overriding the model with the model of a similar supported device. E.g. this works great for roborock vacuum devices and yeelight devices). See [Substitute model for unsupported devices](#substitute-model-for-unsupported-devices)
 - by switching on the `(experimental) Create channels for new/unsupported devices (MIOT protocol)` channel, this works for most newer devices. See [Create support for new devices based on online published spec database](#create-support-for-new-devices-based-on-online-published-spec-database)
 - by switching on the `(experimental) Create channels / test properties for unsupported devices (legacy protocol)` channel. This works for older / legacy devices. It test all known properties to see which are supported by your device. See [Supported property test for unsupported devices](#supported-property-test-for-unsupported-devices)
index c9b08516fab55359f7cbfd281891c56a6ebabd72..00dd6316b672f1c0108f7ccd32a85713a142fb5f 100644 (file)
@@ -146,7 +146,6 @@ public class SunspecDiscoveryProcess {
      * @throws EndpointNotInitializedException
      */
     public void detectModel() {
-
         if (possibleAddresses.isEmpty()) {
             parsingFinished();
             return;
@@ -189,7 +188,6 @@ public class SunspecDiscoveryProcess {
      * Look for a valid model block at the current base address
      */
     private void lookForModelBlock() {
-
         ModbusReadRequestBlueprint request = new ModbusReadRequestBlueprint(slaveId,
                 ModbusReadFunctionCode.READ_MULTIPLE_REGISTERS, baseAddress, // Start address
                 MODEL_HEADER_SIZE, // number or words to return
@@ -233,7 +231,6 @@ public class SunspecDiscoveryProcess {
                 createDiscoveryResult(block);
                 lookForModelBlock();
             }
-
         }
     }
 
index 6f23d701bbe1ba13f8998b9f05076ec7abad3834..e509a77a1b3b11132d6103a5e6e784f3627fe763 100644 (file)
@@ -129,7 +129,6 @@ public abstract class AbstractSunSpecHandler extends BaseThingHandler {
      * Start the periodic polling
      */
     private void startUp() {
-
         connectEndpoint();
 
         if (comms == null || config == null) {
index 52204c9df0e5854b26a1a27bacc784d64b94f868..ff69f99442ed56dff51bfaba92970d491a18cecc 100644 (file)
@@ -38,7 +38,6 @@ public class CommonModelParser extends AbstractBaseParser implements SunspecPars
 
     @Override
     public CommonModelBlock parse(ModbusRegisterArray raw) {
-
         CommonModelBlock block = new CommonModelBlock();
 
         block.sunSpecDID = extractUInt16(raw, 0, 0);
index e527d82627454b088c5d47282ab7aa5e0f820cee..207fa89077602da2c1ba31c51119c6443098949f 100644 (file)
@@ -92,7 +92,6 @@ class QbusMessageDeserializer implements JsonDeserializer<QbusMessageBase> {
 
             if (jsonObject.has("outputs")) {
                 jsonOutputs = jsonObject.get("outputs");
-
             }
 
             if (ctd != null && cmd != null) {
@@ -115,7 +114,6 @@ class QbusMessageDeserializer implements JsonDeserializer<QbusMessageBase> {
                         }
                         ((QbusMessageListMap) message).setOutputs(outputsList);
                     }
-
                 } else {
                     message = new QbusMessageMap();
 
@@ -145,7 +143,6 @@ class QbusMessageDeserializer implements JsonDeserializer<QbusMessageBase> {
                     if (setpoint != null) {
                         message.setSetPoint(setpoint);
                     }
-
                 }
             }
             return message;
index 75ecf8ff449c60b1098916aa345c57460d28560b..48ba46597001d86cc72e2d24a2e5a4f03317c97c 100644 (file)
@@ -108,7 +108,6 @@ public class HTTPHandler {
                         latestTime = iterTime;
                         latestData = iterData;
                     } // else - found item is older - nothing to do
-
                 } else {
                     logger.warn("One or two dates cannot be decoded 1) {} 2) {}", iterTimeStr, latestTimeStr);
                 }
index de79e6d356c6eb49977b43c22684f5afcdafd1b8..d637e87254a86f66c088482f36e2470f409e6b18 100644 (file)
@@ -35,7 +35,6 @@ public class DateTimeUtils {
     public static synchronized @Nullable LocalDateTime toDate(String dateTime) {
         try {
             return LocalDateTime.from(DTF.parse(dateTime));
-
         } catch (DateTimeParseException e) {
             LOGGER.debug("Unable to parse date {}", dateTime);
             return null;
index c871e20dc4a3307dc6b8c7ad7be8bed9ca8df222..7432f30e5c3a5309a4307d1476d374007ae32358 100644 (file)
@@ -289,7 +289,6 @@ public class Shelly2ApiClient extends ShellyHttpClient {
             return false;
         }
 
-        boolean updated = false;
         ShellySettingsMeter sm = new ShellySettingsMeter();
         ShellySettingsEMeter emeter = status.emeters.get(0);
         sm.isValid = emeter.isValid = true;
index d795ac16a3f7a2c5294be94f50f17f4e35449a71..863c2b99a8e40c873a7699bcc18170ddd50205f3 100755 (executable)
@@ -145,9 +145,6 @@ public class ShellyDiscoveryParticipant implements MDNSDiscoveryParticipant {
             try {
                 ShellyApiInterface api = gen2 ? new Shelly2ApiRpc(name, config, httpClient)
                         : new Shelly1HttpApi(name, config, httpClient);
-                if (name.contains("plus1pm")) {
-                    int i = 1;
-                }
                 api.initialize();
                 profile = api.getDeviceProfile(thingType);
                 api.close();
index 056d34ef894a686aa0863d36251cd68823ddff95..a651db5695e40a269fd3a3581f70eeb9fcc9da56 100644 (file)
@@ -5,9 +5,11 @@ Binding to query a [solarwatt](https://www.solarwatt.de/) [energy manager](https
 All supported values and devices were discovered while playing with my own energy manager.
 
 ## Supported devices
+
 * Solarwatt Energymanager; ie. the DIN rail mounted device in your house distribution.
 
 ## Not supported by this binding
+
 * Solarwatt Manager/Manager Flex; ie. the black square device that is wall mounted.
  
 The Solarwatt Manager already contains an OpenHAB installation which can be connected to
index 4eb13120d17610d8bcdd884b407a3c1928fcccb5..bedc966abe3a07c0bcebfd29755d2cfbde800483 100644 (file)
@@ -289,6 +289,7 @@ public class SonnenHandler extends BaseThingHandler {
         }
     }
 
+    @SuppressWarnings("PMD.SimplifyBooleanReturns")
     private boolean arePowerMeterChannelsLinked() {
         if (isLinked(CHANNELENERGYIMPORTEDSTATEPRODUCTION)) {
             return true;
index f6fae07c0ff83ea11bb9b1c5b9b85a043488dc0f..6d13c9f75f9ca5ec8a154bf65947058f878bbfb3 100644 (file)
@@ -135,7 +135,6 @@ public class ApiPageParser extends AbstractSimpleMarkupHandler {
     public void handleStandaloneElement(final @Nullable String elementName,
             final @Nullable Map<String, String> attributes, final boolean minimized, final int line, final int col)
             throws ParseException {
-
         logger.debug("Unexpected StandaloneElement in {}:{}: {} [{}]", line, col, elementName, attributes);
     }
 
@@ -143,7 +142,6 @@ public class ApiPageParser extends AbstractSimpleMarkupHandler {
     @NonNullByDefault({})
     public void handleOpenElement(final @Nullable String elementName, final @Nullable Map<String, String> attributes,
             final int line, final int col) throws ParseException {
-
         if (this.parserState == ParserState.INIT && "div".equals(elementName)) {
             this.parserState = ParserState.DATA_ENTRY;
             String classFlags;
@@ -272,7 +270,6 @@ public class ApiPageParser extends AbstractSimpleMarkupHandler {
     @Override
     public void handleText(final char @Nullable [] buffer, final int offset, final int len, final int line,
             final int col) throws ParseException {
-
         if (buffer == null) {
             return;
         }
index 474683bf0c4f5707fc2fd8493ae7f0c7d5cdb7fd..8b720d1a2066411215761c8fd02061d71faaab94 100644 (file)
@@ -77,7 +77,6 @@ public class ChangerX2Parser extends AbstractSimpleMarkupHandler {
     @NonNullByDefault({})
     public void handleStandaloneElement(final String elementName, final Map<String, String> attributes,
             final boolean minimized, final int line, final int col) throws ParseException {
-
         logger.debug("Error parsing options for {}: Unexpected StandaloneElement in {}{}: {} [{}]", channelName, line,
                 col, elementName, attributes);
     }
@@ -86,7 +85,6 @@ public class ChangerX2Parser extends AbstractSimpleMarkupHandler {
     @NonNullByDefault({})
     public void handleOpenElement(final String elementName, final Map<String, String> attributes, final int line,
             final int col) throws ParseException {
-
         String id = attributes == null ? null : attributes.get("id");
 
         if (this.parserState == ParserState.INIT && "input".equals(elementName) && "changeadr".equals(id)) {
@@ -206,7 +204,6 @@ public class ChangerX2Parser extends AbstractSimpleMarkupHandler {
     @Override
     public void handleText(final char @Nullable [] buffer, final int offset, final int len, final int line,
             final int col) throws ParseException {
-
         if (buffer == null) {
             return;
         }
index a96b8f23d007c5afd8e69912ab6edb905912db44..20ffe80b7e34c0fcf4ee90a1132385653ebb5f2a 100644 (file)
@@ -111,8 +111,9 @@ public enum TapoErrorCode {
 
     public static TapoErrorCode fromCode(int errorCode) {
         for (TapoErrorCode e : TapoErrorCode.values()) {
-            if (e.code.equals(errorCode))
+            if (e.code.equals(errorCode)) {
                 return e;
+            }
         }
         return ERR_UNKNOWN;
     }
index 50dec648cf4c1ad712af7ab032e0c31aa6a95998..1e22675638e2ae84fdafe0bfed5a83b26ea57c3a 100644 (file)
@@ -54,7 +54,6 @@ import org.openhab.core.thing.type.ChannelKind;
 import org.openhab.core.thing.type.ChannelTypeProvider;
 import org.openhab.core.thing.type.ChannelTypeRegistry;
 import org.openhab.core.thing.type.ChannelTypeUID;
-import org.osgi.service.http.HttpService;
 import org.osgi.service.http.NamespaceException;
 
 /**
@@ -88,7 +87,6 @@ class WundergroundUpdateReceiverDiscoveryServiceTest {
         TestChannelTypeRegistry channelTypeRegistry = new TestChannelTypeRegistry();
         WundergroundUpdateReceiverDiscoveryService discoveryService = new WundergroundUpdateReceiverDiscoveryService(
                 true);
-        HttpService httpService = mock(HttpService.class);
         WundergroundUpdateReceiverServlet sut = new WundergroundUpdateReceiverServlet(discoveryService);
         discoveryService.addUnhandledStationId(REQ_STATION_ID, sut.normalizeParameterMap(req.getParameterMap()));
         Thing thing = ThingBuilder.create(SUPPORTED_THING_TYPES_UIDS.stream().findFirst().get(), TEST_THING_UID)
@@ -179,7 +177,6 @@ class WundergroundUpdateReceiverDiscoveryServiceTest {
         TestChannelTypeRegistry channelTypeRegistry = new TestChannelTypeRegistry();
         WundergroundUpdateReceiverDiscoveryService discoveryService = new WundergroundUpdateReceiverDiscoveryService(
                 false);
-        HttpService httpService = mock(HttpService.class);
         WundergroundUpdateReceiverServlet sut = new WundergroundUpdateReceiverServlet(discoveryService);
         discoveryService.addUnhandledStationId(REQ_STATION_ID, sut.normalizeParameterMap(req.getParameterMap()));
         Thing thing = ThingBuilder.create(SUPPORTED_THING_TYPES_UIDS.stream().findFirst().get(), TEST_THING_UID)
@@ -225,7 +222,6 @@ class WundergroundUpdateReceiverDiscoveryServiceTest {
         TestChannelTypeRegistry channelTypeRegistry = new TestChannelTypeRegistry();
         WundergroundUpdateReceiverDiscoveryService discoveryService = new WundergroundUpdateReceiverDiscoveryService(
                 true);
-        HttpService httpService = mock(HttpService.class);
         WundergroundUpdateReceiverServlet sut = new WundergroundUpdateReceiverServlet(discoveryService);
         discoveryService.addUnhandledStationId(REQ_STATION_ID, sut.normalizeParameterMap(req1.getParameterMap()));
         Thing thing = ThingBuilder.create(SUPPORTED_THING_TYPES_UIDS.stream().findFirst().get(), TEST_THING_UID)
@@ -292,7 +288,6 @@ class WundergroundUpdateReceiverDiscoveryServiceTest {
         TestChannelTypeRegistry channelTypeRegistry = new TestChannelTypeRegistry();
         WundergroundUpdateReceiverDiscoveryService discoveryService = new WundergroundUpdateReceiverDiscoveryService(
                 true);
-        HttpService httpService = mock(HttpService.class);
         WundergroundUpdateReceiverServlet sut = new WundergroundUpdateReceiverServlet(discoveryService);
         discoveryService.addUnhandledStationId(REQ_STATION_ID, sut.normalizeParameterMap(req1.getParameterMap()));
         Thing thing = ThingBuilder.create(SUPPORTED_THING_TYPES_UIDS.stream().findFirst().get(), TEST_THING_UID)
@@ -356,7 +351,6 @@ class WundergroundUpdateReceiverDiscoveryServiceTest {
         UpdatingChannelTypeRegistry channelTypeRegistry = new UpdatingChannelTypeRegistry();
         WundergroundUpdateReceiverDiscoveryService discoveryService = new WundergroundUpdateReceiverDiscoveryService(
                 true);
-        HttpService httpService = mock(HttpService.class);
         WundergroundUpdateReceiverServlet sut = new WundergroundUpdateReceiverServlet(discoveryService);
         discoveryService.addUnhandledStationId(REQ_STATION_ID, sut.normalizeParameterMap(req1.getParameterMap()));
         Thing thing = ThingBuilder.create(SUPPORTED_THING_TYPES_UIDS.stream().findFirst().get(), TEST_THING_UID)
index 82015740fd7b746fbac2ca69d62bdb78657a151e..fb80480d03c30623a7272a64224d132ff2b05dc8 100644 (file)
@@ -789,7 +789,6 @@ public class ModbusPollerThingHandlerTest extends AbstractModbusOSGiTest {
     @Test
     public void testRefreshWithOldPreviousData() throws IllegalArgumentException, IllegalAccessException,
             NoSuchFieldException, SecurityException, InterruptedException {
-
         Configuration pollerConfig = new Configuration();
         pollerConfig.put("refresh", 0L);
         pollerConfig.put("start", 5);