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

@@ -16,6 +16,8 @@
package org.springframework.beans.testfixture.beans;
import java.util.Objects;
import org.springframework.lang.Nullable;
/**
@@ -50,7 +52,7 @@ public class Pet {
final Pet pet = (Pet) o;
if (name != null ? !name.equals(pet.name) : pet.name != null) {
if (!Objects.equals(name, pet.name)) {
return false;
}