Use Object.equals() where feasible

See gh-31916
This commit is contained in:
Yanming Zhou
2023-12-28 15:26:12 +08:00
committed by Stéphane Nicoll
parent a6e87b40c7
commit 72a9864788
9 changed files with 19 additions and 9 deletions

View File

@@ -24,6 +24,7 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import org.springframework.asm.ClassVisitor;
@@ -288,7 +289,7 @@ abstract public class BeanMap implements Map {
}
Object v1 = get(key);
Object v2 = other.get(key);
if (!((v1 == null) ? v2 == null : v1.equals(v2))) {
if (!(Objects.equals(v1, v2))) {
return false;
}
}