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

Fix #2023 by handling "empty Callable" case in Flux#collectList #2024

Merged
merged 3 commits into from
Jan 27, 2020

Conversation

bsideup
Copy link
Contributor

@bsideup bsideup commented Jan 27, 2020

It seems that we were handling Callable (but not Fuseable.ScalarCallable) incorrectly
and, instead of producing an empty list, were returning an empty Mono instead.

The change also simplifies handling of Fuseable.ScalarCallable

@codecov-io
Copy link

codecov-io commented Jan 27, 2020

Codecov Report

Merging #2024 into 3.2.x will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##              3.2.x    #2024      +/-   ##
============================================
+ Coverage     84.61%   84.62%   +0.01%     
- Complexity     3966     3968       +2     
============================================
  Files           364      364              
  Lines         30177    30178       +1     
  Branches       5611     5612       +1     
============================================
+ Hits          25533    25537       +4     
+ Misses         3037     3035       -2     
+ Partials       1607     1606       -1
Impacted Files Coverage Δ Complexity Δ
...ore/src/main/java/reactor/core/publisher/Flux.java 98.63% <100%> (ø) 517 <0> (+1) ⬆️
...actor/core/publisher/FluxOnBackpressureLatest.java 80.61% <0%> (-3.07%) 2% <0%> (ø)
...in/java/reactor/core/publisher/FluxWindowWhen.java 80.28% <0%> (-1.45%) 2% <0%> (ø)
...ava/reactor/core/publisher/WorkQueueProcessor.java 69.42% <0%> (-0.83%) 19% <0%> (ø)
...ava/reactor/core/publisher/EventLoopProcessor.java 79.79% <0%> (-0.52%) 51% <0%> (-1%)
...ain/java/reactor/core/publisher/FluxPublishOn.java 86.39% <0%> (-0.21%) 6% <0%> (ø)
...c/main/java/reactor/core/publisher/FluxReplay.java 84.78% <0%> (+0.15%) 25% <0%> (ø) ⬇️
...rc/main/java/reactor/core/publisher/Operators.java 81.4% <0%> (+0.42%) 125% <0%> (ø) ⬇️
...in/java/reactor/core/publisher/TopicProcessor.java 74.85% <0%> (+0.59%) 16% <0%> (ø) ⬇️
...main/java/reactor/core/publisher/FluxGenerate.java 82.2% <0%> (+0.61%) 7% <0%> (ø) ⬇️
... and 3 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 b05e933...2a44b7f. Read the comment docs.

return Mono.onAssembly(new MonoSupplier<>(listSupplier()));
}
return Mono.just(v).map(u -> {
return Mono.fromCallable(() -> {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest to use the form onAssembly(new MonoCallable<>(...)) here and below, so that there is no additional step in the backtrace that corresponds to the fromCallable call.

@bsideup bsideup requested a review from simonbasle January 27, 2020 13:27
@bsideup bsideup merged commit e93cd9d into 3.2.x Jan 27, 2020
@reactorbot
Copy link

@bsideup this PR seems to have been merged on a maintenance branch, please ensure the change is merge-forwarded to intermediate maintenance branches and up to master 🙇

bsideup added a commit that referenced this pull request Jan 27, 2020
@bsideup bsideup deleted the fix_flux_connectList_callable branch January 27, 2020 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants