Skip to content

Include exceptions for previous attempts in RetryException thrown for an InterruptedException #35434

@sbrannen

Description

@sbrannen

In RetryTemplate, if we encounter an InterruptedException while sleeping for the configured back-off duration, we throw a RetryException with the InterruptedException as the cause.

However, in contrast to the specification for RetryException, we do not include the exceptions for previous retry attempts as suppressed exceptions in the RetryException which is thrown in such scenarios.

In order to comply with the documented contract for RetryException, we should include exceptions for previous attempts in the RetryException thrown for an InterruptedException as well.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions