diff --git a/spring-core/src/main/java/org/springframework/core/retry/support/RetryTask.java b/spring-core/src/main/java/org/springframework/core/retry/support/RetryTask.java index aa078814f26..0f81aa57984 100644 --- a/spring-core/src/main/java/org/springframework/core/retry/support/RetryTask.java +++ b/spring-core/src/main/java/org/springframework/core/retry/support/RetryTask.java @@ -65,6 +65,7 @@ public class RetryTask implemen /** * Create a new {@code RetryTask} for the given retryable task. * @param task a task that allows for re-execution after failure + * @see RetryPolicy#withDefaults() * @see #RetryTask(TaskCallback, RetryPolicy) * @see #RetryTask(TaskCallback, RetryOperations) */ @@ -135,6 +136,7 @@ public class RetryTask implemen /** * Wrap the given target {@code Callable} into a retrying {@code Callable}. * @param task a task that allows for re-execution after failure + * @see RetryPolicy#withDefaults() * @see #wrap(Callable, RetryPolicy) * @see #wrap(Callable, RetryOperations) */ @@ -170,6 +172,7 @@ public class RetryTask implemen /** * Wrap the given target {@code Runnable} into a retrying {@code Runnable}. * @param task a task that allows for re-execution after failure + * @see RetryPolicy#withDefaults() * @see #wrap(Runnable, RetryPolicy) * @see #wrap(Runnable, RetryOperations) */ diff --git a/spring-core/src/main/java/org/springframework/core/task/TaskCallback.java b/spring-core/src/main/java/org/springframework/core/task/TaskCallback.java index d7900990047..d1f1f64d264 100644 --- a/spring-core/src/main/java/org/springframework/core/task/TaskCallback.java +++ b/spring-core/src/main/java/org/springframework/core/task/TaskCallback.java @@ -51,7 +51,7 @@ public interface TaskCallback e } /** - * Derive a {@link TaskCallback} from the given {@link Callable}. + * Derive a {@link TaskCallback} from the given {@link Runnable}. * @since 7.0.4 */ @SuppressWarnings("NullAway") diff --git a/spring-core/src/test/java/org/springframework/core/retry/support/RetryTaskTests.java b/spring-core/src/test/java/org/springframework/core/retry/support/RetryTaskTests.java index d0c6788701d..2cb5e773356 100644 --- a/spring-core/src/test/java/org/springframework/core/retry/support/RetryTaskTests.java +++ b/spring-core/src/test/java/org/springframework/core/retry/support/RetryTaskTests.java @@ -55,7 +55,7 @@ class RetryTaskTests { syncExecutor.execute(new RetryTask<>(() -> { invocationCount.incrementAndGet(); return "always succeeds"; - }, retryPolicy))) + }, retryPolicy))) .isEqualTo("always succeeds"); assertThat(invocationCount).hasValue(1); } @@ -68,7 +68,7 @@ class RetryTaskTests { throw new IllegalStateException("Boom " + invocationCount.get()); } return "finally succeeded"; - }, retryPolicy))) + }, retryPolicy))) .isEqualTo("finally succeeded"); assertThat(invocationCount).hasValue(2); }