Add clarifying parentheses to a ternary expression. (#2496)

The latest Error Prone version issues a warning without the parentheses.
Since we build with `-Werror`, that breaks the build.
This commit is contained in:
Éamonn McManus 2023-09-22 17:43:14 -07:00 committed by GitHub
parent e93fda9f17
commit edfaf0c387
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -285,7 +285,7 @@ public final class JsonPrimitive extends JsonElement {
return other.value == null;
}
if (isIntegral(this) && isIntegral(other)) {
return this.value instanceof BigInteger || other.value instanceof BigInteger
return (this.value instanceof BigInteger || other.value instanceof BigInteger)
? this.getAsBigInteger().equals(other.getAsBigInteger())
: this.getAsNumber().longValue() == other.getAsNumber().longValue();
}