Fix or suppress SAT CompareObjectsWithEquals findings (#10631)
* Fix or suppress SAT CompareObjectsWithEquals findings Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
package org.openhab.binding.russound.internal.rio;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
@@ -94,13 +95,8 @@ public class StatefulHandlerCallback implements RioHandlerCallback {
|
||||
|
||||
final State oldState = state.get(channelId);
|
||||
|
||||
// If both null OR the same value (enums), nothing changed
|
||||
if (oldState == newState) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If they are equal - nothing changed
|
||||
if (oldState != null && oldState.equals(newState)) {
|
||||
if (Objects.equals(oldState, newState)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user