-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 ImmutableMap.Builder.build() with buildOrThrow() #10648
Replace ImmutableMap.Builder.build() with buildOrThrow() #10648
Conversation
a019768
to
ab477ab
Compare
Interesting. For the first commit, Github reports
This explains the the # line change as reported by |
red |
@@ -40,11 +40,11 @@ | |||
|
|||
public BackupModule(Map<String, Module> providers) | |||
{ | |||
this.providers = ImmutableMap.<String, Module>builder() | |||
this.providers = ImmutableMap.<String, java.lang.Module>builder() |
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.
This is a bad change done by structural replace in the IDE.
The Module
used here is com.google.inject.Module
, not java.lang.Module
.
Starting with Guava 31, the `build()` method is discouraged and will be deprecated in upcoming releases. See google/guava@4bbe12c for context. The change itself was done mechanically, with IntelliJ's structural search, then fixed line breaks with regular search for `^(\s+)(.put(All)?\(.*\))(\.buildOrThrow\(\))`, then occurrences of `).buildOrThrow()` fixed manually, then end-of-line searched for in the diff (as they got removed by the structural search/replace) and also restored manually.
ab477ab
to
d8efa20
Compare
Starting with Guava 31, the
build()
method is discouraged and will bedeprecated in upcoming releases. See
google/guava@4bbe12c
for context.