guava-retrying
guava-retrying copied to clipboard
Printing error when the number of retries is 0
trafficstars
An exception will be thrown when StopStrategies.stopAfterAttempt is set to 0.
Exception in thread "main" java.lang.IllegalArgumentException: maxAttemptNumber must be >= 1 but is %d [0]
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:190)
It should be
Exception in thread "main" java.lang.IllegalArgumentException: maxAttemptNumber must be >= 1 but is 0
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:190)
Since this project has not been maintained for a long time, I fork this project and fix the problem https://github.com/itning/guava-retrying3