guava-retrying icon indicating copy to clipboard operation
guava-retrying copied to clipboard

Printing error when the number of retries is 0

Open 7yyo opened this issue 4 years ago • 1 comments
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)

7yyo avatar Jun 30 '21 12:06 7yyo

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

itning avatar Sep 07 '21 01:09 itning