Skip to content

2.x: fix Flowable.toList() onNext/cancel race#5247

Merged
akarnokd merged 1 commit intoReactiveX:2.xfrom
akarnokd:ToListNPEFix
Mar 31, 2017
Merged

2.x: fix Flowable.toList() onNext/cancel race#5247
akarnokd merged 1 commit intoReactiveX:2.xfrom
akarnokd:ToListNPEFix

Conversation

@akarnokd
Copy link
Member

This PR fixes the NullPointerException that can happen because cancel nulls out the value and onNext simply dereferences that value in FlowableToList.

Reported in #5246 .

@akarnokd akarnokd added this to the 2.0 backlog milestone Mar 31, 2017
@akarnokd akarnokd merged commit 6c8b0ef into ReactiveX:2.x Mar 31, 2017
@codecov
Copy link

codecov bot commented Mar 31, 2017

Codecov Report

Merging #5247 into 2.x will decrease coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##                2.x   #5247      +/-   ##
===========================================
- Coverage     96.04%     96%   -0.05%     
- Complexity     5749    5750       +1     
===========================================
  Files           628     628              
  Lines         41073   41075       +2     
  Branches       5697    5698       +1     
===========================================
- Hits          39450   39434      -16     
- Misses          636     659      +23     
+ Partials        987     982       -5
Impacted Files Coverage Δ Complexity Δ
...ex/internal/operators/flowable/FlowableToList.java 96.77% <100%> (+0.22%) 2 <0> (ø) ⬇️
...rnal/subscriptions/ArrayCompositeSubscription.java 93.33% <0%> (-6.67%) 17% <0%> (-1%)
...vex/internal/operators/single/SingleTakeUntil.java 86.88% <0%> (-6.56%) 2% <0%> (ø)
.../java/io/reactivex/subjects/SerializedSubject.java 89.47% <0%> (-6.32%) 26% <0%> (-1%)
...in/java/io/reactivex/subjects/BehaviorSubject.java 84.97% <0%> (-5.7%) 56% <0%> (ø)
...rnal/subscriptions/DeferredScalarSubscription.java 93.84% <0%> (-4.62%) 27% <0%> (-1%)
...erators/completable/CompletableConcatIterable.java 95.91% <0%> (-4.09%) 2% <0%> (ø)
...rnal/operators/completable/CompletableTimeout.java 94% <0%> (-4%) 2% <0%> (ø)
...ava/io/reactivex/processors/BehaviorProcessor.java 88.54% <0%> (-3.97%) 62% <0%> (+1%)
...vex/internal/operators/flowable/FlowableTimer.java 92.85% <0%> (-3.58%) 2% <0%> (ø)
... and 42 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 7c95808...affef41. 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.

2 participants