Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be consistent about "duration" method parameters #30

Closed
Stephan202 opened this issue Jan 17, 2015 · 3 comments
Closed

Be consistent about "duration" method parameters #30

Stephan202 opened this issue Jan 17, 2015 · 3 comments
Milestone

Comments

@Stephan202
Copy link
Contributor

The AttemptTimeLimiters and WaitStrategies classes have methods that take a (long, TimeUnit) pair, whereas StopStrategies#stopAfterDelay accepts only a long. Not a big deal, but slightly unfortunate from an API point of view.

How about aligning StopStrategies with the other two classes by introducing StopStrategies#stopAfterDelay(long, TimeUnit) and deprecating StopStrategies#stopAfterDelay(long)?

(I understand the some of the strategy interfaces also take only a long, but most users will not implement those themselves, and in any case those types are in some sense more "low level".)

@rholder
Copy link
Owner

rholder commented May 3, 2015

I like consistency, too. That's a good catch. Feel free to open a PR for it, and I'll get it into the next release.

@rholder rholder added this to the 2.0.0 milestone May 3, 2015
@Stephan202
Copy link
Contributor Author

Cool. I opened PR #39.

rholder added a commit that referenced this issue May 4, 2015
@rholder
Copy link
Owner

rholder commented Jul 1, 2015

Your duration method parameter consistency fix should be good to go now in 2.0.0. Thanks again for your contributions.

@rholder rholder closed this as completed Jul 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants