mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
Reduce SAT warnings (#4187)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
+1
-1
@@ -87,7 +87,7 @@ public class PipedAudioStream extends AudioStream {
|
|||||||
if (closed.getAndSet(true)) {
|
if (closed.getAndSet(true)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.onCloseChain.size() > 0) {
|
if (!this.onCloseChain.isEmpty()) {
|
||||||
this.onCloseChain.forEach(Runnable::run);
|
this.onCloseChain.forEach(Runnable::run);
|
||||||
this.onCloseChain.clear();
|
this.onCloseChain.clear();
|
||||||
}
|
}
|
||||||
|
|||||||
-1
@@ -346,7 +346,6 @@ public final class DiscoveryServiceRegistryImpl implements DiscoveryServiceRegis
|
|||||||
if (startScan(discoveryServices.iterator().next(), listener)) {
|
if (startScan(discoveryServices.iterator().next(), listener)) {
|
||||||
atLeastOneDiscoveryServiceHasBeenStarted = true;
|
atLeastOneDiscoveryServiceHasBeenStarted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return atLeastOneDiscoveryServiceHasBeenStarted;
|
return atLeastOneDiscoveryServiceHasBeenStarted;
|
||||||
|
|||||||
+1
-3
@@ -169,9 +169,7 @@ public class AddonResource implements RESTResource, EventSubscriber {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean lastModifiedIsValid() {
|
private boolean lastModifiedIsValid() {
|
||||||
if (lastModified == null)
|
return (lastModified != null) && ((new Date().getTime() - lastModified.getTime()) <= 450 * 1000);
|
||||||
return false;
|
|
||||||
return (new Date().getTime() - lastModified.getTime()) <= 450 * 1000;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
|
|||||||
+4
-2
@@ -48,10 +48,12 @@ public class FirstTypeDTO implements YamlElement {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (this == o)
|
if (this == o) {
|
||||||
return true;
|
return true;
|
||||||
if (o == null || getClass() != o.getClass())
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
FirstTypeDTO that = (FirstTypeDTO) o;
|
FirstTypeDTO that = (FirstTypeDTO) o;
|
||||||
return Objects.equals(uid, that.uid) && Objects.equals(description, that.description);
|
return Objects.equals(uid, that.uid) && Objects.equals(description, that.description);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-2
@@ -48,10 +48,12 @@ public class SecondTypeDTO implements YamlElement {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (this == o)
|
if (this == o) {
|
||||||
return true;
|
return true;
|
||||||
if (o == null || getClass() != o.getClass())
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
SecondTypeDTO that = (SecondTypeDTO) o;
|
SecondTypeDTO that = (SecondTypeDTO) o;
|
||||||
return Objects.equals(id, that.id) && Objects.equals(label, that.label);
|
return Objects.equals(id, that.id) && Objects.equals(label, that.label);
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-1
@@ -12,7 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
package org.openhab.core.thing.link;
|
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.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user