mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Mark RetryException#getCause non null
This commit simplifies RetryException to always require a root cause and mark it as not nullable. Such exception is the exception thrown by the retryable operation and should always be available as it explains why the invocation was a candidate for retrying in the first place. Closes gh-35332
This commit is contained in:
+1
-2
@@ -112,8 +112,7 @@ public abstract class AbstractRetryInterceptor implements MethodInterceptor {
|
||||
});
|
||||
}
|
||||
catch (RetryException ex) {
|
||||
Throwable cause = ex.getCause();
|
||||
throw (cause != null ? cause : new IllegalStateException(ex.getMessage(), ex));
|
||||
throw ex.getCause();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user