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: Add efficient concatWith(Single|Maybe|Completable) overloads #5845

Merged
merged 4 commits into from
Feb 16, 2018

Conversation

akarnokd
Copy link
Member

@akarnokd akarnokd commented Feb 8, 2018

This PR adds specialized overloads to the concatWith operator in Flowable and Observable.

If accepted, the marbles will be updated in a separate PR.

Related: #5350.

@akarnokd akarnokd added this to the 2.2 milestone Feb 8, 2018
@codecov
Copy link

codecov bot commented Feb 8, 2018

Codecov Report

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

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #5845      +/-   ##
============================================
+ Coverage     96.38%   96.42%   +0.04%     
- Complexity     5812     5835      +23     
============================================
  Files           634      640       +6     
  Lines         41760    41944     +184     
  Branches       5796     5804       +8     
============================================
+ Hits          40251    40446     +195     
+ Misses          591      580      -11     
  Partials        918      918
Impacted Files Coverage Δ Complexity Δ
...rators/flowable/FlowableConcatWithCompletable.java 100% <100%> (ø) 2 <2> (?)
src/main/java/io/reactivex/Flowable.java 100% <100%> (ø) 529 <3> (+3) ⬆️
...rs/observable/ObservableConcatWithCompletable.java 100% <100%> (ø) 2 <2> (?)
...perators/observable/ObservableConcatWithMaybe.java 100% <100%> (ø) 2 <2> (?)
...erators/observable/ObservableConcatWithSingle.java 100% <100%> (ø) 2 <2> (?)
...al/operators/flowable/FlowableConcatWithMaybe.java 100% <100%> (ø) 2 <2> (?)
...l/operators/flowable/FlowableConcatWithSingle.java 100% <100%> (ø) 2 <2> (?)
src/main/java/io/reactivex/Observable.java 100% <100%> (ø) 512 <3> (+3) ⬆️
...l/operators/observable/ObservableFlatMapMaybe.java 84.96% <0%> (-4.58%) 2% <0%> (ø)
...ternal/operators/observable/ObservablePublish.java 92.98% <0%> (-2.64%) 11% <0%> (+1%)
... and 32 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 363f038...60341b1. Read the comment docs.

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.

Good stuff.

} else {
inMaybe = true;
s = SubscriptionHelper.CANCELLED;
MaybeSource<? extends T> c = other;
Copy link
Collaborator

Choose a reason for hiding this comment

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

should probably be named m

@Override
public void onComplete() {
s = SubscriptionHelper.CANCELLED;
SingleSource<? extends T> c = other;
Copy link
Collaborator

Choose a reason for hiding this comment

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

should probably be named s. But then it's conflicting with the subscription s. So I guess ss would be more appropriate.

} else {
inMaybe = true;
DisposableHelper.replace(this, null);
MaybeSource<? extends T> c = other;
Copy link
Collaborator

Choose a reason for hiding this comment

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

should probably be named m

public void onComplete() {
inSingle = true;
DisposableHelper.replace(this, null);
SingleSource<? extends T> c = other;
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here

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