File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
spring-core/src/main/java/org/springframework/core/retry Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 4444public class RetryException extends Exception {
4545
4646 @ Serial
47- private static final long serialVersionUID = 5439915454935047936L ;
47+ private static final long serialVersionUID = 1L ;
4848
4949
5050 /**
Original file line number Diff line number Diff line change 1616
1717package org .springframework .core .retry ;
1818
19+ import java .io .Serial ;
1920import java .util .ArrayDeque ;
2021import java .util .Deque ;
2122
@@ -148,7 +149,7 @@ public RetryListener getRetryListener() {
148149 .formatted (retryableName ));
149150 // Retry process starts here
150151 BackOffExecution backOffExecution = this .retryPolicy .getBackOff ().start ();
151- Deque <Throwable > exceptions = new ArrayDeque <>();
152+ Deque <Throwable > exceptions = new ArrayDeque <>(4 );
152153 exceptions .add (initialException );
153154
154155 Throwable lastException = initialException ;
@@ -200,8 +201,10 @@ public RetryListener getRetryListener() {
200201 }
201202 }
202203
204+
203205 private static class RetryInterruptedException extends RetryException {
204206
207+ @ Serial
205208 private static final long serialVersionUID = 1L ;
206209
207210
@@ -213,7 +216,6 @@ private static class RetryInterruptedException extends RetryException {
213216 public int getRetryCount () {
214217 return (getSuppressed ().length - 1 );
215218 }
216-
217219 }
218220
219221}
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ public class CompositeRetryListener implements RetryListener {
4646
4747 /**
4848 * Create a new {@code CompositeRetryListener}.
49+ * @see #addListener(RetryListener)
4950 */
5051 public CompositeRetryListener () {
5152 }
@@ -56,7 +57,7 @@ public CompositeRetryListener() {
5657 * @param listeners the list of delegate listeners to register; must not be empty
5758 */
5859 public CompositeRetryListener (List <RetryListener > listeners ) {
59- Assert .notEmpty (listeners , "RetryListener List must not be empty" );
60+ Assert .notEmpty (listeners , "RetryListener list must not be empty" );
6061 this .listeners .addAll (listeners );
6162 }
6263
You can’t perform that action at this time.
0 commit comments