From 891ea04a3bd542c20418c2695422060b99c9fd02 Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Sun, 24 Dec 2023 09:20:09 +0100 Subject: [PATCH] Remove some redundant brackets (#16104) Signed-off-by: Wouter Born --- .../openhab/binding/ecobee/internal/handler/EcobeeUtils.java | 2 +- .../livisismarthome/internal/handler/LivisiBridgeHandler.java | 2 +- .../binding/max/internal/handler/MaxCubeBridgeHandler.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bundles/org.openhab.binding.ecobee/src/main/java/org/openhab/binding/ecobee/internal/handler/EcobeeUtils.java b/bundles/org.openhab.binding.ecobee/src/main/java/org/openhab/binding/ecobee/internal/handler/EcobeeUtils.java index 5f39abf2824..cb7c6a437d9 100644 --- a/bundles/org.openhab.binding.ecobee/src/main/java/org/openhab/binding/ecobee/internal/handler/EcobeeUtils.java +++ b/bundles/org.openhab.binding.ecobee/src/main/java/org/openhab/binding/ecobee/internal/handler/EcobeeUtils.java @@ -60,7 +60,7 @@ public final class EcobeeUtils { * Set the state to the passed value. If value is null, set the state to UNDEF */ public static State undefOrOnOff(@Nullable Boolean value) { - return value == null ? UnDefType.UNDEF : OnOffType.from((value)); + return value == null ? UnDefType.UNDEF : OnOffType.from(value); } public static State undefOrString(@Nullable String value) { diff --git a/bundles/org.openhab.binding.livisismarthome/src/main/java/org/openhab/binding/livisismarthome/internal/handler/LivisiBridgeHandler.java b/bundles/org.openhab.binding.livisismarthome/src/main/java/org/openhab/binding/livisismarthome/internal/handler/LivisiBridgeHandler.java index 58864e357e5..4bb54bfd92b 100644 --- a/bundles/org.openhab.binding.livisismarthome/src/main/java/org/openhab/binding/livisismarthome/internal/handler/LivisiBridgeHandler.java +++ b/bundles/org.openhab.binding.livisismarthome/src/main/java/org/openhab/binding/livisismarthome/internal/handler/LivisiBridgeHandler.java @@ -727,7 +727,7 @@ public class LivisiBridgeHandler extends BaseBridgeHandler (capabilityId) -> client.setVariableActuatorState(capabilityId, state)); // PSS / PSSO / ISS2 / BT-PSS } else if (DEVICE_PSS.equals(deviceType) || DEVICE_PSSO.equals(deviceType) || DEVICE_ISS2.equals(deviceType) - || DEVICE_BT_PSS.equals((deviceType))) { + || DEVICE_BT_PSS.equals(deviceType)) { executeCommand(deviceId, CapabilityDTO.TYPE_SWITCHACTUATOR, (capabilityId) -> client.setSwitchActuatorState(capabilityId, state)); } diff --git a/bundles/org.openhab.binding.max/src/main/java/org/openhab/binding/max/internal/handler/MaxCubeBridgeHandler.java b/bundles/org.openhab.binding.max/src/main/java/org/openhab/binding/max/internal/handler/MaxCubeBridgeHandler.java index 83a4e5d947a..50fb18cbae6 100644 --- a/bundles/org.openhab.binding.max/src/main/java/org/openhab/binding/max/internal/handler/MaxCubeBridgeHandler.java +++ b/bundles/org.openhab.binding.max/src/main/java/org/openhab/binding/max/internal/handler/MaxCubeBridgeHandler.java @@ -997,7 +997,7 @@ public class MaxCubeBridgeHandler extends BaseBridgeHandler { private boolean socketConnect() throws UnknownHostException, IOException { socket = new Socket(ipAddress, port); - socket.setSoTimeout((NETWORK_TIMEOUT)); + socket.setSoTimeout(NETWORK_TIMEOUT); logger.debug("Open new connection... to {} port {}", ipAddress, port); reader = new BufferedReader(new InputStreamReader(socket.getInputStream(), StandardCharsets.UTF_8)); writer = new OutputStreamWriter(socket.getOutputStream(), StandardCharsets.UTF_8);