Polish "Use Object.equals() where feasible"

See gh-31916
This commit is contained in:
Stéphane Nicoll
2023-12-28 13:19:27 +01:00
parent 72a9864788
commit adcf236a3d
9 changed files with 12 additions and 21 deletions

View File

@@ -49,14 +49,8 @@ public class Pet {
if (o == null || getClass() != o.getClass()) {
return false;
}
final Pet pet = (Pet) o;
if (!Objects.equals(name, pet.name)) {
return false;
}
return true;
Pet pet = (Pet) o;
return Objects.equals(this.name, pet.name);
}
@Override