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 missing null check to fused Observable.fromCallable #5517

Merged
merged 1 commit into from
Jul 25, 2017

Conversation

akarnokd
Copy link
Member

There was a missing null check on the fusion path in ObservableFromCallable which meant the consumer considered the source to be empty. (The FlowableFromCallable was okay.)

Discovered on StackOverflow: https://stackoverflow.com/questions/45304226/null-handling-in-rx-java2-flatmap

Unit test mirrored and updated to verify both Flowable and Observable versions.

@akarnokd akarnokd added this to the 2.2 milestone Jul 25, 2017
@codecov
Copy link

codecov bot commented Jul 25, 2017

Codecov Report

Merging #5517 into 2.x will decrease coverage by 0.16%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #5517      +/-   ##
============================================
- Coverage     96.24%   96.07%   -0.17%     
+ Complexity     5811     5801      -10     
============================================
  Files           631      631              
  Lines         41285    41285              
  Branches       5732     5732              
============================================
- Hits          39734    39665      -69     
- Misses          604      637      +33     
- Partials        947      983      +36
Impacted Files Coverage Δ Complexity Δ
...l/operators/observable/ObservableFromCallable.java 100% <100%> (ø) 5 <1> (ø) ⬇️
.../operators/observable/ObservableFlatMapSingle.java 90.29% <0%> (-6.72%) 2% <0%> (ø)
...ava/io/reactivex/processors/BehaviorProcessor.java 86.72% <0%> (-6.64%) 61% <0%> (-1%)
...vex/internal/operators/single/SingleTakeUntil.java 86.88% <0%> (-6.56%) 2% <0%> (ø)
...tivex/internal/schedulers/InstantPeriodicTask.java 61.11% <0%> (-5.56%) 7% <0%> (-2%)
...internal/disposables/ArrayCompositeDisposable.java 96.42% <0%> (-3.58%) 15% <0%> (-1%)
...ernal/operators/flowable/FlowableFlatMapMaybe.java 92.75% <0%> (-3.39%) 2% <0%> (ø)
...ex/internal/operators/maybe/MaybeTimeoutMaybe.java 95.58% <0%> (-2.95%) 2% <0%> (ø)
...x/internal/operators/maybe/MaybeSwitchIfEmpty.java 97.22% <0%> (-2.78%) 2% <0%> (ø)
...l/operators/observable/ObservableFlatMapMaybe.java 86.27% <0%> (-2.62%) 2% <0%> (ø)
... and 39 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 e4fbe4c...c5cd88d. 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.

3 participants