mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[lifx] Fix all code analysis findings (#13638)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
7728bbc232
commit
aea2fd4002
@ -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
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user