From e56f7c1e53e5d326819742de6a59bd582e469d00 Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Sun, 25 Jan 2026 17:28:55 +0100 Subject: [PATCH] Polishing --- .../org/springframework/core/retry/support/RetryTask.java | 3 +++ .../main/java/org/springframework/core/task/TaskCallback.java | 2 +- .../springframework/core/retry/support/RetryTaskTests.java | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) 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); }