Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaDoc for UniRetry#atMost and MultiRetry#atMost is wrong #724

Closed
oliver-brm opened this issue Oct 12, 2021 · 2 comments
Closed

JavaDoc for UniRetry#atMost and MultiRetry#atMost is wrong #724

oliver-brm opened this issue Oct 12, 2021 · 2 comments
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@oliver-brm
Copy link
Contributor

The JavaDocs for UniRetry#atMost and MultiRetry#atMost state that "the last failure is propagated" when the number of attempts is reached. That's true, but only if no back-off has been configured. When a back-off is configured, then an IllegalStateException is thrown by ExponentialBackoff.

Doing a quick check, I saw that only UniRetry and MultiRetry actually use the randomExponentialBackoffFunction. I propose that we change it, so that it adds the IllegalStateException, with its useful message about how many retries have been made, into the list of suppressed exceptions of the original failure (Throwable#addSuppressed). WDYT?

I could take care of such a change.

@cescoffier
Copy link
Contributor

It makes sense.

@jponge
Copy link
Member

jponge commented Oct 12, 2021

👍 thanks

@jponge jponge added this to the 1.2.0 milestone Oct 12, 2021
@jponge jponge added the documentation Improvements or additions to documentation label Oct 12, 2021
cescoffier added a commit that referenced this issue Oct 13, 2021
Make UniRetry & MultiRetry propagate the original Exception (#724)
@jponge jponge modified the milestones: 1.2.0, 1.1.2 Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants