[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)) {
|
} else if (!duration.equals(other.duration)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (enable != other.enable) {
|
return enable == other.enable;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -389,9 +389,6 @@ public abstract class Packet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isFulfilled(Packet somePacket) {
|
public boolean isFulfilled(Packet somePacket) {
|
||||||
if (isExpectedResponse(somePacket.getPacketType())) {
|
return isExpectedResponse(somePacket.getPacketType());
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -126,10 +126,7 @@ public class HSBK {
|
|||||||
if (brightness != other.brightness) {
|
if (brightness != other.brightness) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (kelvin != other.kelvin) {
|
return kelvin == other.kelvin;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -101,10 +101,6 @@ public class MACAddress {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final MACAddress other = (MACAddress) obj;
|
final MACAddress other = (MACAddress) obj;
|
||||||
if (!this.hex.equalsIgnoreCase(other.hex)) {
|
return this.hex.equalsIgnoreCase(other.hex);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,8 +23,6 @@ import java.util.concurrent.locks.ReentrantLock;
|
|||||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||||
import org.eclipse.jdt.annotation.Nullable;
|
import org.eclipse.jdt.annotation.Nullable;
|
||||||
import org.openhab.binding.lifx.internal.fields.MACAddress;
|
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
|
* 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
|
@NonNullByDefault
|
||||||
public final class LifxThrottlingUtil {
|
public final class LifxThrottlingUtil {
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(LifxThrottlingUtil.class);
|
|
||||||
|
|
||||||
private LifxThrottlingUtil() {
|
private LifxThrottlingUtil() {
|
||||||
// hidden utility class constructor
|
// hidden utility class constructor
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user