Skip to content

Commit

Permalink
Add parentheses to avoid a new Error Prone warning.
Browse files Browse the repository at this point in the history
Because we compile with `-Werror`, this warning breaks the build.
  • Loading branch information
eamonnmcmanus committed Sep 23, 2023
1 parent 0579468 commit 3b0bccc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gson/src/main/java/com/google/gson/JsonPrimitive.java
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public boolean equals(Object obj) {
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();
}
Expand Down

0 comments on commit 3b0bccc

Please sign in to comment.