Skip to content

Commit c5fd57d

Browse files
committed
Polish @⁠Retryable Javadoc and internals
1 parent f601bbb commit c5fd57d

File tree

5 files changed

+14
-15
lines changed

5 files changed

+14
-15
lines changed

spring-aop/src/main/java/org/springframework/aop/retry/AbstractRetryInterceptor.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ public AbstractRetryInterceptor() {
118118
}
119119
@Override
120120
public String getName() {
121-
Object target = invocation.getThis();
122121
return ClassUtils.getQualifiedMethodName(method, (target != null ? target.getClass() : null));
123122
}
124123
});

spring-aop/src/main/java/org/springframework/aop/retry/MethodRetrySpec.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
*
2727
* @author Juergen Hoeller
2828
* @since 7.0
29-
* @param includes applicable exceptions types to attempt a retry for
30-
* @param excludes non-applicable exceptions types to avoid a retry for
29+
* @param includes applicable exception types to attempt a retry for
30+
* @param excludes non-applicable exception types to avoid a retry for
3131
* @param predicate a predicate for filtering exceptions from applicable methods
3232
* @param maxAttempts the maximum number of retry attempts
3333
* @param delay the base delay after the initial invocation (in milliseconds)
@@ -49,7 +49,7 @@ public record MethodRetrySpec(
4949
long maxDelay) {
5050

5151
public MethodRetrySpec(MethodRetryPredicate predicate, int maxAttempts, long delay) {
52-
this(predicate, maxAttempts, delay, 0,1.0, Integer.MAX_VALUE);
52+
this(predicate, maxAttempts, delay, 0, 1.0, Integer.MAX_VALUE);
5353
}
5454

5555
public MethodRetrySpec(MethodRetryPredicate predicate, int maxAttempts, long delay,

spring-aop/src/main/java/org/springframework/aop/retry/annotation/RetryAnnotationBeanPostProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
import org.springframework.aop.support.ComposablePointcut;
2222
import org.springframework.aop.support.DefaultPointcutAdvisor;
2323
import org.springframework.aop.support.annotation.AnnotationMatchingPointcut;
24-
import org.springframework.beans.factory.config.BeanPostProcessor;
2524

2625
/**
27-
* A convenient {@link BeanPostProcessor} that applies {@link RetryAnnotationInterceptor}
26+
* A convenient {@link org.springframework.beans.factory.config.BeanPostProcessor
27+
* BeanPostProcessor} that applies {@link RetryAnnotationInterceptor}
2828
* to all bean methods annotated with {@link Retryable} annotations.
2929
*
3030
* @author Juergen Hoeller

spring-aop/src/main/java/org/springframework/aop/retry/annotation/Retryable.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
Class<? extends Throwable>[] value() default {};
5858

5959
/**
60-
* Applicable exceptions types to attempt a retry for. This attribute
60+
* Applicable exception types to attempt a retry for. This attribute
6161
* allows for the convenient specification of assignable exception types.
6262
* <p>The default is empty, leading to a retry attempt for any exception.
6363
* @see #excludes()
@@ -67,7 +67,7 @@
6767
Class<? extends Throwable>[] includes() default {};
6868

6969
/**
70-
* Non-applicable exceptions types to avoid a retry for. This attribute
70+
* Non-applicable exception types to avoid a retry for. This attribute
7171
* allows for the convenient specification of assignable exception types.
7272
* <p>The default is empty, leading to a retry attempt for any exception.
7373
* @see #includes()
@@ -117,7 +117,7 @@
117117
* A multiplier for a delay for the next retry attempt, applied
118118
* to the previous delay (starting with {@link #delay()}) as well
119119
* as to the applicable {@link #jitterDelay()} for each attempt.
120-
* <p>The default is 1.0, effectively leading to a fixed delay.
120+
* <p>The default is 1.0, effectively resulting in a fixed delay.
121121
* @see #delay()
122122
* @see #jitterDelay()
123123
* @see #maxDelay()
@@ -127,7 +127,7 @@
127127
/**
128128
* The maximum delay for any retry attempt (in milliseconds), limiting
129129
* how far {@link #jitterDelay()} and {@link #delayMultiplier()} can
130-
* increase {@link #delay()}.
130+
* increase the {@linkplain #delay() delay}.
131131
* <p>The default is unlimited.
132132
* @see #delay()
133133
* @see #jitterDelay()

spring-core/src/main/java/org/springframework/util/backoff/ExponentialBackOff.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,25 +61,25 @@
6161
public class ExponentialBackOff implements BackOff {
6262

6363
/**
64-
* The default initial interval: 2000 ms.
64+
* The default initial interval: {@value} ms.
6565
*/
6666
public static final long DEFAULT_INITIAL_INTERVAL = 2000L;
6767

6868
/**
69-
* The default jitter range for each interval: 0 ms.
69+
* The default jitter range for each interval: {@value} ms.
7070
* @since 7.0
7171
*/
7272
public static final long DEFAULT_JITTER = 0;
7373

7474
/**
75-
* The default multiplier (increases the interval by 50%).
75+
* The default multiplier (increases the interval by 50%): {@value}.
7676
*/
7777
public static final double DEFAULT_MULTIPLIER = 1.5;
7878

7979
/**
80-
* The default maximum back-off time: 30000 ms.
80+
* The default maximum back-off time: {@value} ms.
8181
*/
82-
public static final long DEFAULT_MAX_INTERVAL = 30000L;
82+
public static final long DEFAULT_MAX_INTERVAL = 30_000L;
8383

8484
/**
8585
* The default maximum elapsed time: unlimited.

0 commit comments

Comments
 (0)