You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FullJitterBackoffStrategy takes a base delay and a max delay, the constructor checks if these values are >= 0. This check should actually be > 0 though because passing a 0 for either of these values will result in calling random.nextInt(0) on line 65, throwing an illegal argument exception when calculating the retry delay.
Expected Behavior
The retry strategy throws an exception when creating the strategy.
Current Behavior
The constructor passes and then an IllegalArgumentException is thrown on retry.
Reproduction Steps
Pass 0 for base delay or max delay parameters, have the client retry.
Possible Solution
Change the checks in the constructor from isNotNegative to isPositive
Additional Information/Context
No response
AWS Java SDK version used
2.0
JDK version used
17
Operating System and version
macOS 17.1.1
The text was updated successfully, but these errors were encountered:
Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
FullJitterBackoffStrategy takes a base delay and a max delay, the constructor checks if these values are >= 0. This check should actually be > 0 though because passing a 0 for either of these values will result in calling
random.nextInt(0)
on line 65, throwing an illegal argument exception when calculating the retry delay.Expected Behavior
The retry strategy throws an exception when creating the strategy.
Current Behavior
The constructor passes and then an IllegalArgumentException is thrown on retry.
Reproduction Steps
Pass 0 for base delay or max delay parameters, have the client retry.
Possible Solution
Change the checks in the constructor from
isNotNegative
toisPositive
Additional Information/Context
No response
AWS Java SDK version used
2.0
JDK version used
17
Operating System and version
macOS 17.1.1
The text was updated successfully, but these errors were encountered: