mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Resolve some Guava 20 TODOs (mostly unnecessary asList() calls)
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=146799536
This commit is contained in:
parent
f212a53232
commit
ec55aa5361
12 changed files with 18 additions and 41 deletions
|
@ -15,6 +15,7 @@
|
|||
package google.registry.util;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
import static com.google.common.base.Throwables.throwIfUnchecked;
|
||||
import static com.google.common.collect.Iterables.any;
|
||||
import static com.google.common.math.IntMath.pow;
|
||||
import static google.registry.util.PredicateUtils.supertypeOf;
|
||||
|
@ -103,14 +104,4 @@ public class Retrier implements Serializable {
|
|||
return any(retryables, supertypeOf(e.getClass()));
|
||||
}});
|
||||
}
|
||||
|
||||
// TODO(user): Replace with Throwables.throwIfUnchecked
|
||||
private static void throwIfUnchecked(Throwable throwable) {
|
||||
if (throwable instanceof RuntimeException) {
|
||||
throw (RuntimeException) throwable;
|
||||
}
|
||||
if (throwable instanceof Error) {
|
||||
throw (Error) throwable;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue