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

1.x and 2.x Javadoc for Completable's retryWhen differs from Observable, Single and Docs #4809

Closed
aballano opened this issue Nov 4, 2016 · 5 comments

Comments

@aballano
Copy link

aballano commented Nov 4, 2016

While trying to use the retryWhen operator of the Completable I had problems understanding the behaviour detailed in it´s javadoc:

Returns a Completable which given a Publisher and when this Completable emits an error, delivers that error through an Observable and the Publisher should return a value indicating a retry in response or a terminal event indicating a termination.

Which highly differs from the documentation of Observable, Single and the docs, where the need of calling the provided observable's onNext/onError/onCompleted is more detailed:

Returns an Observable that emits the same values as the source observable with the exception of an {@code onError}. An {@code onError} notification from the source will result in the emission of a {@link Throwable} item to the Observable provided as an argument to the {@code notificationHandler} function. If that Observable calls {@code onComplete} or {@code onError} then {@code retry} will call {@code onCompleted} or {@code onError} on the child subscription. Otherwise, this Observable will resubscribe to the source Observable.

I could prepare a PR for both 1.x and 2.x versions if needed.

@akarnokd
Copy link
Member

akarnokd commented Nov 4, 2016

Most people set up a flow inside the retryWhen so nobody calls onNext manually in there. However, the text should use a bit of a cleanup:

Returns a Completable which given a Publisher and when this Completable emits an error, delivers that error through a Flowable and the Publisher should signal a value indicating a retry in response or a terminal event indicating a termination.

@aballano
Copy link
Author

aballano commented Nov 4, 2016

Subtle but meaningful change! :)

@akarnokd Would you prefer to do the change yourself or should I?

@akarnokd
Copy link
Member

akarnokd commented Nov 4, 2016

You are welcome to change 2.x. Don't change 1.x.

@aballano
Copy link
Author

aballano commented Nov 4, 2016

@akarnokd Any specific reason why not to change 1.x? Just curious.

@akarnokd
Copy link
Member

akarnokd commented Nov 4, 2016

Don't want to mix in 2.x terminology.

Closing via #4810.

@akarnokd akarnokd closed this as completed Nov 4, 2016
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