diff --git a/src/test/java/net/jodah/failsafe/examples/RetryLoopExample.java b/src/test/java/net/jodah/failsafe/examples/RetryLoopExample.java index 5e9f974c..4416d74a 100644 --- a/src/test/java/net/jodah/failsafe/examples/RetryLoopExample.java +++ b/src/test/java/net/jodah/failsafe/examples/RetryLoopExample.java @@ -37,7 +37,7 @@ public class RetryLoopExample { public static void main(String... args) throws Throwable { RetryPolicy retryPolicy = new RetryPolicy<>().handle(IllegalStateException.class).withBackoff(10, 40, ChronoUnit.MILLIS); - Execution execution = new Execution(retryPolicy); + Execution execution = new Execution<>(retryPolicy); while (!execution.isComplete()) { try { @@ -50,7 +50,7 @@ public static void main(String... args) throws Throwable { } } - assertEquals(execution.getLastResult(), Integer.valueOf(5)); + assertEquals(execution.getLastResult(), 5); assertEquals(execution.getAttemptCount(), 3); } } diff --git a/src/test/java/net/jodah/failsafe/examples/RxJavaExample.java b/src/test/java/net/jodah/failsafe/examples/RxJavaExample.java index afc130c5..40f584fe 100644 --- a/src/test/java/net/jodah/failsafe/examples/RxJavaExample.java +++ b/src/test/java/net/jodah/failsafe/examples/RxJavaExample.java @@ -36,13 +36,13 @@ public static void main(String... args) { else System.out.println("Subscriber completed successfully"); }).retryWhen(attempts -> { - Execution execution = new Execution(retryPolicy); + Execution execution = new Execution<>(retryPolicy); return attempts.flatMap(failure -> { System.out.println("Failure detected"); if (execution.canRetryOn(failure)) return Observable.timer(execution.getWaitTime().toNanos(), TimeUnit.NANOSECONDS); else - return Observable.error(failure); + return Observable.error(failure); }); }).toBlocking().forEach(System.out::println); }