You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnvertx.createHttpServer()
.requestHandler(router::handle)
.listen(8080)
.onItem().invoke(() -> logger.info("HTTP server listening on port 8080"))
.replaceWith(Uni.createFrom().voidItem());
where the return value is expected to be a Uni<Void>, then we cannot simplify with replaceWithNull since it keeps the original parametric type, yet with a null value.
We should add replaceWithVoid, as in:
returnvertx.createHttpServer()
.requestHandler(router::handle)
.listen(8080)
.onItem().invoke(() -> logger.info("HTTP server listening on port 8080"))
.replaceWithVoid();
The text was updated successfully, but these errors were encountered:
When writing code such as:
where the return value is expected to be a
Uni<Void>
, then we cannot simplify withreplaceWithNull
since it keeps the original parametric type, yet with anull
value.We should add
replaceWithVoid
, as in:The text was updated successfully, but these errors were encountered: