Reduce SAT warnings (#4187)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>pull/4192/head
parent
0db45fa168
commit
a79a9c651b
|
@ -87,7 +87,7 @@ public class PipedAudioStream extends AudioStream {
|
|||
if (closed.getAndSet(true)) {
|
||||
return;
|
||||
}
|
||||
if (this.onCloseChain.size() > 0) {
|
||||
if (!this.onCloseChain.isEmpty()) {
|
||||
this.onCloseChain.forEach(Runnable::run);
|
||||
this.onCloseChain.clear();
|
||||
}
|
||||
|
|
|
@ -346,7 +346,6 @@ public final class DiscoveryServiceRegistryImpl implements DiscoveryServiceRegis
|
|||
if (startScan(discoveryServices.iterator().next(), listener)) {
|
||||
atLeastOneDiscoveryServiceHasBeenStarted = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return atLeastOneDiscoveryServiceHasBeenStarted;
|
||||
|
|
|
@ -169,9 +169,7 @@ public class AddonResource implements RESTResource, EventSubscriber {
|
|||
}
|
||||
|
||||
private boolean lastModifiedIsValid() {
|
||||
if (lastModified == null)
|
||||
return false;
|
||||
return (new Date().getTime() - lastModified.getTime()) <= 450 * 1000;
|
||||
return (lastModified != null) && ((new Date().getTime() - lastModified.getTime()) <= 450 * 1000);
|
||||
}
|
||||
|
||||
@GET
|
||||
|
|
|
@ -48,10 +48,12 @@ public class FirstTypeDTO implements YamlElement {
|
|||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
if (this == o) {
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
FirstTypeDTO that = (FirstTypeDTO) o;
|
||||
return Objects.equals(uid, that.uid) && Objects.equals(description, that.description);
|
||||
}
|
||||
|
|
|
@ -48,10 +48,12 @@ public class SecondTypeDTO implements YamlElement {
|
|||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
if (this == o) {
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
SecondTypeDTO that = (SecondTypeDTO) o;
|
||||
return Objects.equals(id, that.id) && Objects.equals(label, that.label);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,12 @@
|
|||
*/
|
||||
package org.openhab.core.thing.link;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
|
|
Loading…
Reference in New Issue