Skip to content

Commit

Permalink
add SuppressWarnings annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleexender committed Feb 6, 2025
1 parent a3d3acc commit 0994bb4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion reactor-core/src/main/java/reactor/core/publisher/Mono.java
Original file line number Diff line number Diff line change
Expand Up @@ -5427,7 +5427,9 @@ static <T> Mono<T> wrap(Publisher<T> source, boolean enforceMonoContract) {
}

if (source instanceof Flux && source instanceof Callable) {
return Flux.wrapToMono((Callable<T>) source);
@SuppressWarnings("unchecked")
Callable<T> callable = (Callable<T>) source;
return Flux.wrapToMono(callable);
}

Mono<T> target = createMonoSource(source, enforceMonoContract);
Expand Down

0 comments on commit 0994bb4

Please sign in to comment.