-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
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
Replace out instances of RateLimiter.create(rate, Duration.ZERO)
#1958
Conversation
Generate changelog in
|
1a84cc5
to
66f3df5
Compare
66f3df5
to
77c7f63
Compare
.addOutputLines( | ||
"Test.java", | ||
"import com.google.common.util.concurrent.RateLimiter;", | ||
"import java.time.Duration;", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No action required. Wondering if it is common/feasible to do import removal in cases like these. Or is there no way of guaranteeing the import isn't being used elsewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great question: We could search the CompilationUnit for uses of any given import, but the fun part is that we don't have to :-) We always follow up automated refactors with our code formatter, that way the results become pretty, and unused imports are removed automatically!
.expectUnchanged() | ||
.doTest(); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Could benefit from a sanity check that tests double arguments, i.e: RateLimiter.create(10, 100, TimeUnit.SECONDS);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figure we can add that when we fix the constant-zero case for the value-and-unit overload -- at the moment the check doesn't look at other overloads.
Released 4.37.0 |
###### _excavator_ is a bot for automating changes across repositories. Changes produced by the roomba/latest-baseline-oss check. # Release Notes ## 4.37.0 | Type | Description | Link | | ---- | ----------- | ---- | | Fix | Replace out instances of `RateLimiter.create(rate, Duration.ZERO)` which do not rate limit at all. See google/guava#2730 | palantir/gradle-baseline#1958 | To enable or disable this check, please contact the maintainers of Excavator.
==COMMIT_MSG==
Replace out instances of
RateLimiter.create(rate, Duration.ZERO)
which do not rate limit at all. See google/guava#2730==COMMIT_MSG==