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

2.x: fix doOnSubscribe signalling Undeliv.Exception instead of just onError #5103

Merged
merged 1 commit into from
Feb 16, 2017

Conversation

akarnokd
Copy link
Member

This PR fixes the issue reported on StackOverflow where crashing the lambda in Flowable.doOnSubscribe calls the RxJavaPlugins.onError, which crashes the app and prevents calling the EmptySubscription.error on Android. (Desktop prints to the console and delivers the error normally.)

The bug was present in the Flowable, Observable and Completable. All 5 base types received the respective unit test to ensure correct behavior.

@akarnokd akarnokd added this to the 2.0 backlog milestone Feb 16, 2017
@codecov
Copy link

codecov bot commented Feb 16, 2017

Codecov Report

Merging #5103 into 2.x will decrease coverage by -0.01%.
The diff coverage is 96.96%.

@@             Coverage Diff             @@
##                2.x   #5103      +/-   ##
===========================================
- Coverage     95.61%   95.6%   -0.01%     
- Complexity     5554    5562       +8     
===========================================
  Files           615     615              
  Lines         39685   39703      +18     
  Branches       5578    5583       +5     
===========================================
+ Hits          37944   37959      +15     
- Misses          757     762       +5     
+ Partials        984     982       -2
Impacted Files Coverage Δ Complexity Δ
...x/internal/observers/DisposableLambdaObserver.java 85.29% <100%> (+20.77%) 8 <4> (+2)
...rnal/operators/flowable/FlowableDoOnLifecycle.java 100% <100%> (ø) 2 <ø> (ø)
...nternal/operators/completable/CompletablePeek.java 96.87% <96.29%> (-3.13%) 2 <1> (ø)
...in/java/io/reactivex/subjects/BehaviorSubject.java 83.93% <ø> (-6.74%) 55% <ø> (-1%)
.../operators/completable/CompletableConcatArray.java 93.75% <ø> (-6.25%) 2% <ø> (ø)
...rnal/subscribers/SinglePostCompleteSubscriber.java 94.87% <ø> (-5.13%) 14% <ø> (-1%)
...rnal/subscriptions/DeferredScalarSubscription.java 93.84% <ø> (-4.62%) 27% <ø> (-1%)
...erators/completable/CompletableConcatIterable.java 95.91% <ø> (-4.09%) 2% <ø> (ø)
...reactivex/internal/operators/maybe/MaybeUsing.java 95.95% <ø> (-4.05%) 4% <ø> (ø)
...ernal/operators/maybe/MaybeTakeUntilPublisher.java 96% <ø> (-4%) 2% <ø> (ø)
... and 36 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6daf59e...d67794d. Read the comment docs.

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