Skip to content

Commit e93a6a7

Browse files
committed
Improve wording for retry exceptions
1 parent 1786eb2 commit e93a6a7

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

spring-core/src/main/java/org/springframework/core/retry/RetryException.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import java.util.Objects;
2121

2222
/**
23-
* Exception thrown when a {@link RetryPolicy} has been exhausted.
23+
* Exception thrown when a {@link RetryPolicy} has been exhausted or interrupted.
2424
*
2525
* <p>A {@code RetryException} will typically contain the last exception thrown
2626
* by the {@link Retryable} operation as the {@linkplain #getCause() cause} and
@@ -31,9 +31,9 @@
3131
* {@linkplain Thread#sleep(long) sleeping} for the current
3232
* {@link org.springframework.util.backoff.BackOff BackOff} duration, a
3333
* {@code RetryException} will contain the {@code InterruptedException} as the
34-
* {@linkplain #getCause() cause} and any exceptions from previous attempts to
35-
* invoke the {@code Retryable} operation as {@linkplain #getSuppressed()
36-
* suppressed exceptions}.
34+
* {@linkplain #getCause() cause} and any exceptions from previous invocations
35+
* of the {@code Retryable} operation as {@linkplain #getSuppressed() suppressed
36+
* exceptions}.
3737
*
3838
* @author Mahmoud Ben Hassine
3939
* @author Juergen Hoeller

spring-core/src/main/java/org/springframework/core/retry/RetryListener.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ default void onRetryFailure(RetryPolicy retryPolicy, Retryable<?> retryable, Thr
6464
/**
6565
* Called if the {@link RetryPolicy} is exhausted.
6666
* @param retryPolicy the {@code RetryPolicy}
67-
* @param retryable the {@code Retryable} operation
67+
* @param retryable the {@link Retryable} operation
6868
* @param exception the resulting {@link RetryException}, with the last
69-
* exception thrown by the {@link Retryable} operation as the cause and any
69+
* exception thrown by the {@code Retryable} operation as the cause and any
7070
* exceptions from previous attempts as suppressed exceptions
7171
* @see RetryException#getCause()
7272
* @see RetryException#getSuppressed()
@@ -76,13 +76,12 @@ default void onRetryPolicyExhaustion(RetryPolicy retryPolicy, Retryable<?> retry
7676
}
7777

7878
/**
79-
* Called if an {@link InterruptedException} is encountered while
80-
* {@linkplain Thread#sleep(long) sleeping} between retry attempts.
79+
* Called if the {@link RetryPolicy} is interrupted between retry attempts.
8180
* @param retryPolicy the {@code RetryPolicy}
82-
* @param retryable the {@code Retryable} operation
83-
* @param exception the resulting {@link RetryException}, with the
84-
* {@code InterruptedException} as the cause and any exceptions from previous
85-
* retry attempts as suppressed exceptions
81+
* @param retryable the {@link Retryable} operation
82+
* @param exception the resulting {@link RetryException}, with an
83+
* {@link InterruptedException} as the cause and any exceptions from previous
84+
* invocations of the {@code Retryable} operation as suppressed exceptions
8685
* @see RetryException#getCause()
8786
* @see RetryException#getSuppressed()
8887
* @see RetryException#getRetryCount()

0 commit comments

Comments
 (0)