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: Improve Completable.onErrorResumeNext internals #6123

Merged
merged 2 commits into from
Aug 1, 2018

Conversation

akarnokd
Copy link
Member

@akarnokd akarnokd commented Aug 1, 2018

This PR improves the internals of the Completable.onErrorResumeNext operator:

  • Inline the Disposable management.
  • Reuse the same instance for observing the fallback CompletableSource.
  • Report null return of the errorMapper the same way as a crash via CompositeException.
  • The exceptions in the composite should be in the order original -> mapper exception.

@akarnokd akarnokd added this to the 2.2 backlog milestone Aug 1, 2018
@codecov
Copy link

codecov bot commented Aug 1, 2018

Codecov Report

Merging #6123 into 2.x will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #6123      +/-   ##
============================================
+ Coverage     98.25%   98.29%   +0.04%     
- Complexity     6193     6194       +1     
============================================
  Files           667      667              
  Lines         44861    44856       -5     
  Branches       6213     6213              
============================================
+ Hits          44077    44092      +15     
+ Misses          243      231      -12     
+ Partials        541      533       -8
Impacted Files Coverage Δ Complexity Δ
...l/operators/completable/CompletableResumeNext.java 100% <100%> (ø) 2 <1> (ø) ⬇️
.../operators/observable/ObservableFlatMapSingle.java 88.8% <0%> (-2.99%) 2% <0%> (ø)
...tivex/internal/schedulers/TrampolineScheduler.java 96.1% <0%> (-2.6%) 6% <0%> (ø)
...ava/io/reactivex/processors/BehaviorProcessor.java 96.86% <0%> (-2.25%) 60% <0%> (ø)
.../io/reactivex/internal/schedulers/IoScheduler.java 89.24% <0%> (-2.16%) 9% <0%> (ø)
...activex/internal/schedulers/ScheduledRunnable.java 98.07% <0%> (-1.93%) 29% <0%> (-1%)
...x/internal/operators/flowable/FlowablePublish.java 97.44% <0%> (-1.71%) 11% <0%> (ø)
...rnal/operators/observable/ObservableSwitchMap.java 94.68% <0%> (-1.6%) 3% <0%> (ø)
...a/io/reactivex/internal/util/QueueDrainHelper.java 97.22% <0%> (-1.39%) 56% <0%> (-1%)
...java/io/reactivex/processors/UnicastProcessor.java 98.8% <0%> (-1.2%) 67% <0%> (-1%)
... and 24 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 45cc53d...e5fed1e. Read the comment docs.

@akarnokd akarnokd merged commit a008e03 into ReactiveX:2.x Aug 1, 2018
@akarnokd akarnokd deleted the CompletableResumeNextImprovements branch August 1, 2018 20:20
Copy link
Collaborator

@vanniktech vanniktech left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Collaborator

@davidmoten davidmoten left a comment

Choose a reason for hiding this comment

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

👍

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.

4 participants