File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
spring-core/src/main/java/org/springframework/core/retry Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1919import java .io .Serial ;
2020import java .util .Objects ;
2121
22- import org .jspecify .annotations .NonNull ;
23-
2422/**
2523 * Exception thrown when a {@link RetryPolicy} has been exhausted.
2624 *
@@ -37,15 +35,18 @@ public class RetryException extends Exception {
3735 /**
3836 * Create a new {@code RetryException} for the supplied message and cause.
3937 * @param message the detail message
40- * @param cause the root cause
38+ * @param cause the last exception thrown by the {@link Retryable} operation
4139 */
4240 public RetryException (String message , Throwable cause ) {
43- super (message , cause );
41+ super (message , Objects . requireNonNull ( cause , "cause must not be null" ) );
4442 }
4543
4644
45+ /**
46+ * Get the the last exception thrown by the {@link Retryable} operation.
47+ */
4748 @ Override
48- public synchronized @ NonNull Throwable getCause () {
49+ public final synchronized Throwable getCause () {
4950 return Objects .requireNonNull (super .getCause ());
5051 }
5152
You can’t perform that action at this time.
0 commit comments