Repository navigation
Conversation
guanchengang
marked this pull request as draft
October 10, 2026 07:24
guanchengang
force-pushed
the
improve/default-retry-policy-tostring-timeout
branch
from
October 10, 2026 07:55
e68ac09 to
4147654
Compare
guanchengang
marked this pull request as ready for review
October 10, 2026 08:12
timeout in DefaultRetryPolicy.toString()timeout in DefaultRetryPolicy.toString()
sbrannen
requested changes
Oct 10, 2026
sbrannen
left a comment
Member
There was a problem hiding this comment.
When the timeout is zero or negative,
It shouldn't be possible for it to be negative. See RetryPolicy.Builder.timeout(Duration).
display it as "none" to indicate that timeout checking is disabled. This avoids the misleading PT0S output.
Instead of displaying none, let's just omit the timeout altogether if it's zero. I've updated the PR's title to reflect that.
Only include the timeout field when it is non-zero. Closes spring-projectsgh-37437 Signed-off-by: Chengang Guan <guanchengang@qq.com>
guanchengang
force-pushed
the
improve/default-retry-policy-tostring-timeout
branch
from
October 10, 2026 12:45
4147654 to
3bfe2b2
Compare
Contributor
Author
You're right, and sorry for the confusion, the mention of negative timeouts was a slip on my part. I never actually handled negatives in the code. I've updated the code, tests, and commit message as you suggested. |
sbrannen
approved these changes
Oct 10, 2026
sbrannen
added a commit
that referenced
this pull request
Oct 10, 2026
Member
guanchengang
deleted the
improve/default-retry-policy-tostring-timeout
branch
October 12, 2026 00:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Include the
timeoutinDefaultRetryPolicy.toString(), but omit it when it is zero.A zero
timeoutis the default and signals that timeout checking is disabled, so omitting it is consistent with howincludes,excludes, andpredicateare omitted when not configured, and it avoids the misleadingPT0Soutput.