-
Notifications
You must be signed in to change notification settings - Fork 531
Add warnings for invalid setter values in ExponentialBackoffPolicy #492
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
Add warnings for invalid setter values in ExponentialBackoffPolicy #492
Conversation
src/main/java/org/springframework/retry/backoff/ExponentialBackOffPolicy.java
Outdated
Show resolved
Hide resolved
src/main/java/org/springframework/retry/backoff/ExponentialBackOffPolicy.java
Outdated
Show resolved
Hide resolved
src/main/java/org/springframework/retry/backoff/ExponentialBackOffPolicy.java
Outdated
Show resolved
Hide resolved
src/main/java/org/springframework/retry/backoff/ExponentialBackOffPolicy.java
Outdated
Show resolved
Hide resolved
src/test/java/org/springframework/retry/backoff/ExponentialBackOffPolicyTests.java
Outdated
Show resolved
Hide resolved
Hi @kssumin ! We have release this Friday. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error: Failed to execute goal io.spring.javaformat:spring-javaformat-maven-plugin:0.0.43:validate (default) on project spring-retry: Formatting violations found in the following files:
Error: * /home/runner/work/spring-retry/spring-retry/src/main/java/org/springframework/retry/backoff/ExponentialBackOffPolicy.java
Error: * /home/runner/work/spring-retry/spring-retry/src/test/java/org/springframework/retry/backoff/ExponentialBackOffPolicyTests.java
Error:
Error: Run `spring-javaformat:apply` to fix.
0e6f529
to
3d7eafe
Compare
@artembilan Thank you for the detailed review! I've addressed all your feedback:
All changes have been implemented in the latest commit. Please let me know if there's anything else that needs to be adjusted. |
3d7eafe
to
0ab5470
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Please, add your name to the @author
list of the effected classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error: * /home/runner/work/spring-retry/spring-retry/src/test/java/org/springframework/retry/backoff/ExponentialBackOffPolicyTests.java
Error:
Error: Run `spring-javaformat:apply` to fix.
Please, ensure to run mvnw verify
before pushing to the PR.
Thanks
0ab5470
to
38c071d
Compare
![]() @artembilan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last remark.
I see this in the commit:
Signed-off-by: kssumin <[email protected]>
That has to be your real legal name.
We cannot accept contributions with nick names.
Also, see if that is real email.
The DCO requirements must be met.
You have to fix your Git client to use your proper legal name.
Then you would need to force-push into this PR with new Signed-off-by
.
Thank you for understanding!
- Add warning logs when setter values don't meet expected constraints - Maintain backward compatibility by not changing behavior Fixes spring-projects#352 Signed-off-by: Kim Sumin <[email protected]>
38c071d
to
0149a59
Compare
The email was indeed valid, but I've now changed it to a more commonly used email address. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! Will merge tomorrow , my morning.
Thank you again!
This PR addresses #352 by adding warning logs when invalid values are provided to ExponentialBackoffPolicy setters.
Changes
setInitialInterval()
when value < 1setMultiplier()
when value <= 1.0setMaxInterval()
when value <= 0Motivation
The current implementation silently adjusts invalid values without informing users. This can lead to confusion when configured values differ from actual behavior. Adding warning logs helps users understand when their configuration needs adjustment.
Backward Compatibility
This change maintains backward compatibility by:
Related Issue
Closes #352