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

Update to EndConsumerHelper #77

Merged
merged 3 commits into from
Sep 4, 2017
Merged

Update to EndConsumerHelper #77

merged 3 commits into from
Sep 4, 2017

Conversation

ZacSweers
Copy link
Collaborator

Resolves #76

From the original PR:

This PR changes the "Disposable already set!" and "Subscription already set!" messages on the standard consumer classes (DisposableSubscriber, DisposableObserver, etc.) to something more meaningful:

"It is not allowed to subscribe with a(n) multiple times. Please create a fresh instance of and subscribe that to the target source instead."

Where is a placeholder for the getClass().getName() of the subclass of those consumer types. It should clearly state to avoid subscribing with them multiple times as well as printing the full class name to indicate the problem is with the use of the implementor class, and not with the abstract RxJava class.

Inspired by this Stackoverflow question, one of many such questions.

For the internal operators, the original error message stays because when they appear, that is still likely due to an implementation bug (or a misbehaving user-created custom implementation).

Resolves #76

From the original PR:

This PR changes the "Disposable already set!" and "Subscription already set!" messages on the standard consumer classes (DisposableSubscriber, DisposableObserver, etc.) to something more meaningful:

"It is not allowed to subscribe with a(n) <class name> multiple times. Please create a fresh instance of <class name> and subscribe that to the target source instead."

Where <class name> is a placeholder for the getClass().getName() of the subclass of those consumer types. It should clearly state to avoid subscribing with them multiple times as well as printing the full class name to indicate the problem is with the use of the implementor class, and not with the abstract RxJava class.

Inspired by [this Stackoverflow](http://stackoverflow.com/questions/43482263/rxjava2-protocolviolationexception-disposable-already-set) question, one of many such questions.

For the internal operators, the original error message stays because when they appear, that is still likely due to an implementation bug (or a misbehaving user-created custom implementation).
@ZacSweers ZacSweers self-assigned this Aug 31, 2017
@ZacSweers ZacSweers merged commit c28544e into master Sep 4, 2017
@ZacSweers ZacSweers deleted the z/endconsumer branch September 4, 2017 05:50
@ZacSweers ZacSweers modified the milestone: 0.3.0 Sep 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants