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

Better null tolerance in rx.exceptions.*Exception classes. #3438

Merged
merged 1 commit into from
Oct 19, 2015

Conversation

akarnokd
Copy link
Member

There seems to be a tendency to send null values through onError which eventually causes repeated failures. This PR converts these null values into NullPointerExceptions so the error origin is can be discovered and prevents the XXXExceptions from throwing NPEs in their constructors as well.

I've also added some missing javadoc.

@akarnokd akarnokd added the Bug label Oct 12, 2015
@akarnokd akarnokd added this to the 1.0.x milestone Oct 12, 2015
@zsxwing
Copy link
Member

zsxwing commented Oct 18, 2015

👍

@artem-zinnatullin
Copy link
Contributor

Code is 👍, but not sure I like null tolerance for exceptions… subscriber.onError(null) is like throw null.

@akarnokd
Copy link
Member Author

The problem is that NPEs will crash the streams further and likely end up hanging somewhere.

@artem-zinnatullin
Copy link
Contributor

Yeah, I understand… Okay, I guess.

akarnokd added a commit that referenced this pull request Oct 19, 2015
Better null tolerance in rx.exceptions.*Exception classes.
@akarnokd akarnokd merged commit 7cdfb6d into ReactiveX:1.x Oct 19, 2015
@akarnokd akarnokd deleted the ExceptionNullSafety branch October 19, 2015 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants