core: compare doubles with compare instead of ==

Always not compare equality for doubles with `==`.
This commit is contained in:
ZHANG Dapeng 2018-04-13 09:39:59 -07:00 committed by GitHub
parent 0a598c053c
commit 0eafb8e9ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ final class RetryPolicy {
return this.maxAttempts == that.maxAttempts return this.maxAttempts == that.maxAttempts
&& this.initialBackoffNanos == that.initialBackoffNanos && this.initialBackoffNanos == that.initialBackoffNanos
&& this.maxBackoffNanos == that.maxBackoffNanos && this.maxBackoffNanos == that.maxBackoffNanos
&& this.backoffMultiplier == that.backoffMultiplier && Double.compare(this.backoffMultiplier, that.backoffMultiplier) == 0
&& Objects.equal(this.retryableStatusCodes, that.retryableStatusCodes); && Objects.equal(this.retryableStatusCodes, that.retryableStatusCodes);
} }