Skip to content

Commit

Permalink
Use ImmutableMap.Builder.buildOrThrow() instead of deprecated `buil…
Browse files Browse the repository at this point in the history
…d()`.

PiperOrigin-RevId: 425716752
  • Loading branch information
kluever authored and Google Java Core Libraries committed Feb 1, 2022
1 parent 723ba25 commit 2181235
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ protected static final <K, V> ImmutableMap<K, V> mapOf(K k0, V v0, Object... res
for (int i = 0; i < rest.length; i += 2) {
builder.put((K) rest[i], (V) rest[i + 1]);
}
return builder.build();
return builder.buildOrThrow();
}

@SuppressWarnings("unchecked")
Expand Down

0 comments on commit 2181235

Please sign in to comment.