mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Replace com.google.common.base.Predicate with java.util.function.Predicate
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=179579304
This commit is contained in:
parent
0bb2e12a8a
commit
f1ae66d148
10 changed files with 29 additions and 32 deletions
|
@ -19,11 +19,11 @@ import static com.google.common.base.Throwables.throwIfUnchecked;
|
|||
import static com.google.common.math.IntMath.pow;
|
||||
import static google.registry.util.PredicateUtils.supertypeOf;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import java.io.Serializable;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.function.Predicate;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
import org.joda.time.Duration;
|
||||
|
@ -88,7 +88,7 @@ public class Retrier implements Serializable {
|
|||
try {
|
||||
return callable.call();
|
||||
} catch (Throwable e) {
|
||||
if (++failures == attempts || !isRetryable.apply(e)) {
|
||||
if (++failures == attempts || !isRetryable.test(e)) {
|
||||
failureReporter.afterFinalFailure(e, failures);
|
||||
throwIfUnchecked(e);
|
||||
throw new RuntimeException(e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue