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: FlowableScanSeed - prevent multiple terminal events #4899

Merged
merged 1 commit into from
Dec 3, 2016

Conversation

davidmoten
Copy link
Collaborator

This PR

  • prevents multiple terminal events being emitted when the scan function throws
  • prevents processing of a later onNext if the previous onNext processing resulted in an error emission
  • increases coverage to 100% of FlowableScanSeed

@codecov-io
Copy link

codecov-io commented Dec 3, 2016

Current coverage is 95.60% (diff: 100%)

Merging #4899 into 2.x will decrease coverage by 0.19%

@@                2.x      #4899   diff @@
==========================================
  Files           586        586          
  Lines         37381      37389     +8   
  Methods           0          0          
  Messages          0          0          
  Branches       5618       5621     +3   
==========================================
- Hits          35812      35746    -66   
- Misses          653        691    +38   
- Partials        916        952    +36   

Powered by Codecov. Last update 846afd3...e55459b

@@ -51,6 +51,8 @@ protected void subscribeActual(Subscriber<? super R> s) {
private static final long serialVersionUID = -1776795561228106469L;

final BiFunction<R, ? super T, R> accumulator;

boolean done = false;
Copy link
Member

Choose a reason for hiding this comment

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

No need to set a default value.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

righto, fixed

@davidmoten
Copy link
Collaborator Author

updated PR with onNext protection and test (had forgotten to commit)

@akarnokd akarnokd added this to the 2.0 backlog milestone Dec 3, 2016
@akarnokd akarnokd merged commit 75e9bfa into ReactiveX:2.x Dec 3, 2016
@davidmoten davidmoten changed the title FlowableScanSeed - prevent multiple terminal events 2.x: FlowableScanSeed - prevent multiple terminal events Dec 3, 2016
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