vert.x
vert.x copied to clipboard
Generic of CompositeFuture::all not working under java17
Questions
'all(java.util.List<io.vertx.core.Future>)' in 'io.vertx.core.CompositeFuture' cannot be applied to '(java.util.List<io.vertx.core.Future<java.lang.String>>)'
The same problem of CompositeFuture::join and CompositeFuture::any
Version
JDK17 / 4.3.0
I also ran into this yesterday and thought I was doing something wrong.
I found this open issue from a while back which had a response.
How about to makeCompositeFuture#all accept List<Future<?>>
@vietj This was open in 2019, I'm guessing it's difficult to modify the code generator as you mentioned in the ticket?
New to Java....
Does anyone know of how to work around this?
you can use as work around your own static method that does it for you.
we cannot change this in vertx otherwise it would be a breaking change unfortunately.
it will be addressed in the next major version
Added an explanation to someone's answer about this on Stack Overflow