Skip to content

2.x: make SingleMap not allow map function return null#5378

Merged
akarnokd merged 1 commit intoReactiveX:2.xfrom
kojilin:FIX-NPE
May 30, 2017
Merged

2.x: make SingleMap not allow map function return null#5378
akarnokd merged 1 commit intoReactiveX:2.xfrom
kojilin:FIX-NPE

Conversation

@kojilin
Copy link
Contributor

@kojilin kojilin commented May 30, 2017

Found code like below can works

Single.just("1234").map(s -> null)
              .subscribe(s -> {
                  System.out.println(s);
              });

Because Single#just not allow null, so prevent mapper return null.

@codecov
Copy link

codecov bot commented May 30, 2017

Codecov Report

Merging #5378 into 2.x will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #5378      +/-   ##
============================================
- Coverage     96.15%   96.13%   -0.02%     
+ Complexity     5782     5780       -2     
============================================
  Files           630      630              
  Lines         41189    41189              
  Branches       5726     5726              
============================================
- Hits          39604    39597       -7     
+ Misses          621      619       -2     
- Partials        964      973       +9
Impacted Files Coverage Δ Complexity Δ
...reactivex/internal/operators/single/SingleMap.java 100% <100%> (ø) 2 <0> (ø) ⬇️
...ternal/operators/flowable/FlowableSubscribeOn.java 91.52% <0%> (-6.78%) 2% <0%> (ø)
...al/operators/observable/ObservableSampleTimed.java 91.66% <0%> (-5%) 3% <0%> (ø)
...ex/internal/operators/maybe/MaybeTimeoutMaybe.java 94.11% <0%> (-4.42%) 2% <0%> (ø)
...rnal/operators/flowable/FlowableTakeLastTimed.java 95.37% <0%> (-3.71%) 2% <0%> (ø)
...reactivex/internal/operators/single/SingleAmb.java 96.36% <0%> (-3.64%) 9% <0%> (-1%)
...ternal/operators/observable/ObservablePublish.java 92.1% <0%> (-3.51%) 10% <0%> (ø)
...internal/operators/completable/CompletableAmb.java 94.91% <0%> (-3.39%) 10% <0%> (-1%)
...l/operators/observable/ObservableFlatMapMaybe.java 93.46% <0%> (-3.27%) 2% <0%> (ø)
...ternal/operators/completable/CompletableCache.java 96.96% <0%> (-3.04%) 23% <0%> (-1%)
... and 49 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 c507577...ad5c48f. Read the comment docs.

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.

LGTM, thanks!

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