2.x: fix Observable.concatMapEager bad logic for immediate scalars #4982

Merged
merged 2 commits into from Jan 11, 2017

Projects

None yet

4 participants

@akarnokd
Member

The operator Observable.concatMapEager had a bad optimization targeting scalar and callable sources and emitted their values immediately even if it wasn't that particular source's turn for it.

The Flowable is not affected, added unit tests for both.

Reported in #4981.

@akarnokd akarnokd added 2.x Bug labels Jan 11, 2017
@akarnokd akarnokd added this to the 2.0 backlog milestone Jan 11, 2017
+ .concatMapEager(new Function<Integer, Flowable<Integer>>() {
+ @Override
+ public Flowable<Integer> apply(Integer i) throws Exception {
+ System.out.println("Processing " + i);
@vanniktech
vanniktech Jan 11, 2017 Contributor

Just cluttering it up and can be removed?

+ .concatMapEager(new Function<Integer, ObservableSource<Integer>>() {
+ @Override
+ public ObservableSource<Integer> apply(Integer i) throws Exception {
+ System.out.println("Processing " + i);
@vanniktech
vanniktech Jan 11, 2017 Contributor

Same

@akarnokd
akarnokd Jan 11, 2017 Member

Updated.

@codecov-io
codecov-io commented Jan 11, 2017 edited

Current coverage is 95.65% (diff: 100%)

Merging #4982 into 2.x will increase coverage by 0.10%

@@                2.x      #4982   diff @@
==========================================
  Files           592        592          
  Lines         37977      37968     -9   
  Methods           0          0          
  Messages          0          0          
  Branches       5754       5752     -2   
==========================================
+ Hits          36287      36320    +33   
+ Misses          720        700    -20   
+ Partials        970        948    -22   

Powered by Codecov. Last update 0a254a8...64cf7cb

@akarnokd akarnokd merged commit 5717827 into ReactiveX:2.x Jan 11, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment