1
0
mirror of https://github.com/google/nomulus synced 2026-01-09 15:43:52 +00:00

Use equals() method to compare equality (#2158)

It will call equalsImmutableObject(), which seems the right thing to do.
We only care if the two Tld objects have the same fields, not if they
are the same object. ErrorProne complained about comparison by identity.
This commit is contained in:
Lai Jiang
2023-09-28 13:27:36 -04:00
committed by GitHub
parent 0801679173
commit cb240a8f03

View File

@@ -130,7 +130,7 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
public static final Money DEFAULT_REGISTRY_LOCK_OR_UNLOCK_BILLING_COST = Money.of(USD, 0);
public boolean equalYaml(Tld tldToCompare) {
if (this == tldToCompare) {
if (this.equals(tldToCompare)) {
return true;
}
ObjectMapper mapper = createObjectMapper();