-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat(kotlin): add switchIfEmpty with deferred execution #1460
feat(kotlin): add switchIfEmpty with deferred execution #1460
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1460 +/- ##
============================================
- Coverage 84.29% 84.25% -0.04%
+ Complexity 3894 3893 -1
============================================
Files 358 358
Lines 29426 29427 +1
Branches 5464 5464
============================================
- Hits 24804 24794 -10
- Misses 3026 3031 +5
- Partials 1596 1602 +6
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, can you change the @since TBD
to @since 3.2
?
999b8cc
to
d640e2b
Compare
Modification made. I've set version I've also modified a signature method to accept 👍 |
d640e2b
to
25d67f7
Compare
@@ -202,3 +202,12 @@ fun <T : Any, E : Throwable> Flux<T>.onErrorReturn(exceptionType: KClass<E>, val | |||
* @since 3.1 | |||
*/ | |||
fun <T : Any> Flux<out Iterable<T>>.split(): Flux<T> = this.flatMapIterable { it } | |||
|
|||
/** | |||
* Extension for [Flux.switchIfEmpty] accepting a function providing a Mono. This allows having a deferred execution with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"a function providing a Mono" -> "a function providing a Publisher"
…itchIfEmpty(s: () -> Publisher<T>)` This allows supporting a deferred execution when using the `switchIfEmpty` operator
25d67f7
to
5729987
Compare
This allows supporting a deferred execution when using the
switchIfEmpty
operator