diff --git a/bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/dto/HevCycleState.java b/bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/dto/HevCycleState.java index 4139dd027dd..02acc152595 100644 --- a/bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/dto/HevCycleState.java +++ b/bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/dto/HevCycleState.java @@ -73,10 +73,7 @@ public class HevCycleState { } else if (!duration.equals(other.duration)) { return false; } - if (enable != other.enable) { - return false; - } - return true; + return enable == other.enable; } @Override diff --git a/bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/dto/Packet.java b/bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/dto/Packet.java index a8cd4307e76..bf78f0b426d 100644 --- a/bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/dto/Packet.java +++ b/bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/dto/Packet.java @@ -389,9 +389,6 @@ public abstract class Packet { } public boolean isFulfilled(Packet somePacket) { - if (isExpectedResponse(somePacket.getPacketType())) { - return true; - } - return false; + return isExpectedResponse(somePacket.getPacketType()); } } diff --git a/bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/fields/HSBK.java b/bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/fields/HSBK.java index 9a6c24246b4..0a3d081c1ae 100644 --- a/bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/fields/HSBK.java +++ b/bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/fields/HSBK.java @@ -126,10 +126,7 @@ public class HSBK { if (brightness != other.brightness) { return false; } - if (kelvin != other.kelvin) { - return false; - } - return true; + return kelvin == other.kelvin; } @Override diff --git a/bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/fields/MACAddress.java b/bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/fields/MACAddress.java index a5ad018037e..312fb40ffe0 100644 --- a/bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/fields/MACAddress.java +++ b/bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/fields/MACAddress.java @@ -101,10 +101,6 @@ public class MACAddress { } final MACAddress other = (MACAddress) obj; - if (!this.hex.equalsIgnoreCase(other.hex)) { - return false; - } - - return true; + return this.hex.equalsIgnoreCase(other.hex); } } diff --git a/bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/util/LifxThrottlingUtil.java b/bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/util/LifxThrottlingUtil.java index b55d81c1be8..248f74be64b 100644 --- a/bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/util/LifxThrottlingUtil.java +++ b/bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/util/LifxThrottlingUtil.java @@ -23,8 +23,6 @@ import java.util.concurrent.locks.ReentrantLock; import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable; import org.openhab.binding.lifx.internal.fields.MACAddress; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * The {@link LifxThrottlingUtil} is a utility class that regulates the frequency at which messages/packets are @@ -37,8 +35,6 @@ import org.slf4j.LoggerFactory; @NonNullByDefault public final class LifxThrottlingUtil { - private static final Logger LOGGER = LoggerFactory.getLogger(LifxThrottlingUtil.class); - private LifxThrottlingUtil() { // hidden utility class constructor }