Zip contains parameter with Mono<Void> type
Reports zip operations that contains arguments with Mono<Void>
return value inside a Reactor chain.
Zip
completes empty as soon as incoming Mono<Void>
completes. The quick-fix suggests replacing zip()
and zipWhen()
and zipWith()
with when
.
Example:
Mono.zip(Mono.just(1), Mono.fromRunnable(() -> System.out.println("value")))
.map(v -> "New value")
.doFinally(System.out::println);
After the quick-fix is applied:
Mono.when(Mono.just(1), Mono.fromRunnable(() -> System.out.println("value")))
.then(Mono.fromCallable(() -> "New value"))
.doFinally(System.out::println);
New in 2023.1
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Reactive Streams, 233.SNAPSHOT |
Last modified: 13 July 2023