We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
public final void setRate(double permitsPerSecond) { checkArgument( permitsPerSecond > 0.0 && !Double.isNaN(permitsPerSecond), "rate must be positive"); synchronized (mutex()) { doSetRate(permitsPerSecond, stopwatch.readMicros()); } }
when permitsPerSecond is NaN,NaN > 0.0 return false, so check "!Double.isNaN(permitsPerSecond)" is redundant
The text was updated successfully, but these errors were encountered:
Remove unnecessary explicit NaN check.
0dc9dde
Fixes #7255 Fixes #7260 RELNOTES=n/a PiperOrigin-RevId: 642968559
20348c7
cpovirk
Successfully merging a pull request may close this issue.
when permitsPerSecond is NaN,NaN > 0.0 return false, so check "!Double.isNaN(permitsPerSecond)" is redundant
The text was updated successfully, but these errors were encountered: