-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
2.x: Check isdisposed before emitting in SingleFromCallable #5743
Conversation
T v = callable.call(); | ||
if (v != null) { | ||
s.onSuccess(v); | ||
value = ObjectHelper.requireNonNull(callable.call(), "Callable returned null"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You got the error message wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 fixed now :)
31d4277
to
d1e69a3
Compare
Codecov Report
@@ Coverage Diff @@
## 2.x #5743 +/- ##
============================================
- Coverage 96.29% 96.22% -0.07%
- Complexity 5833 5836 +3
============================================
Files 634 634
Lines 41615 41620 +5
Branches 5761 5763 +2
============================================
- Hits 40073 40050 -23
- Misses 611 634 +23
- Partials 931 936 +5
Continue to review full report at Codecov.
|
Could you please restore the code coverage of |
Previously SingleFromCallable did not check if the subscriber was unsubscribed before emitting onSuccess or onError. This fixes that behavior and adds tests to SingleFromCallable, CompletableFromCallable, and MaybeFromCallable. Fixes ReactiveX#5742
d1e69a3
to
8da1b86
Compare
Sounds good. I added a few tests by copying the logic from |
Previously SingleFromCallable did not check if the subscriber was
unsubscribed before emitting onSuccess or onError. This fixes that
behavior and adds tests to SingleFromCallable, CompletableFromCallable,
and MaybeFromCallable.
Fixes #5742