Skip to content

Comments

Printing error when the number of retries is 0#99

Open
7yyo wants to merge 1 commit intorholder:masterfrom
7yyo:fix_maxAttempNumber_0
Open

Printing error when the number of retries is 0#99
7yyo wants to merge 1 commit intorholder:masterfrom
7yyo:fix_maxAttempNumber_0

Conversation

@7yyo
Copy link

@7yyo 7yyo commented Jun 30, 2021

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)

@itning
Copy link

itning commented Sep 7, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants