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

Add Single.defer() #3433

Merged
merged 1 commit into from Nov 11, 2015
Merged

Add Single.defer() #3433

merged 1 commit into from Nov 11, 2015

Conversation

artem-zinnatullin
Copy link
Contributor

No description provided.

return;
}

single.subscribe(singleSubscriber);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please notice that I'm not wrapping subscriber via Subscribers.wrap() because SingleSubscriber differs from Subscriber, that's why I used subscribe instead of unsafeSubscribe() here.

If this should be changed, please comment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SingleSubscriber doesn't have onStart like Subscriber so this is not a problem.

@akarnokd
Copy link
Member

Please add unit test for callback returning null cases.

@artem-zinnatullin
Copy link
Contributor Author

@akarnokd added deferShouldPassNullPointerExceptionToTheSubscriberIfSingleFactoryIsNull and deferShouldPassNullPointerExceptionToTheSubscriberIfSingleFactoryReturnsNull.

Btw, I've used Callable instead of Func0 to save users from dealing with checked exception, hope it's okay :)

@akarnokd
Copy link
Member

Func0 extends Callable so its okay.

.:+1:

@akarnokd akarnokd added this to the 1.0.x milestone Oct 12, 2015
@akarnokd akarnokd mentioned this pull request Oct 13, 2015
@abersnaze
Copy link
Contributor

👍 rebase please

@akarnokd
Copy link
Member

I'm still 👍 but please rebase.

@artem-zinnatullin
Copy link
Contributor Author

Rebased!

akarnokd added a commit that referenced this pull request Nov 11, 2015
@akarnokd akarnokd merged commit 2894ed0 into ReactiveX:1.x Nov 11, 2015
@akarnokd
Copy link
Member

Thanks! Merged.

@passsy
Copy link
Contributor

passsy commented Dec 2, 2015

thanks

@artem-zinnatullin artem-zinnatullin deleted the single-defer branch December 2, 2015 22:07
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.

None yet

4 participants