-
Notifications
You must be signed in to change notification settings - Fork 519
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
IllegalArgumentException when migrating from 1.3.1 to 1.3.2 and using class annotations #299
Comments
I am not sure (yet) what caused it, but the behavior has definitely changed; as a work-around, moving the |
It was broken by the fix for this #244 |
Another work around is to remove the |
garyrussell
added a commit
to garyrussell/spring-retry
that referenced
this issue
May 18, 2022
Resolves spring-projects#299 Caused by the fix for spring-projects#244, recover methods should not be considered as retryable, with class level annotation. **cherry-pick to 1.3.x**
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I am using a setup similar to the following, where I have a
@Retryable
defined on the class and also a@Recover
method.When running with spring-retry v1.3.1 this worked fine and
myMethod
is run 3 times beforerecoverMyMethod
is called a single time before the exception is finally thrown.When running with v1.3.2 or v1.3.3 of spring-retry the behaviour changes and it also retries the recover method too. So
myMethod
is called 3 times and thenrecoverMyMethod
is called 3 times before finally anIllegalArgumentException
is thrown.I think this exception is thrown because it is trying to call
recoverMyMethod
to recover from itself and gets confused when creating the args to call it and ends up trying to call it with(Exception, Exception)
instead of(Exception, String)
.Is this a bug in spring-retry, or are we using it incorrectly?
Here is an example project which illustrates the issue:
spring-retry-test.zip
The text was updated successfully, but these errors were encountered: