-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
Version
4.5.11
Context
class com.hiddenswitch.framework.tests.impl.FrameworkTestBase$Checkpoint cannot be cast to class io.vertx.core.impl.future.FutureInternal (com.hiddenswitch.framework.tests.impl.FrameworkTestBase$Checkpoint and io.vertx.core.impl.future.FutureInternal are in unnamed module of loader 'app')
java.lang.ClassCastException: class com.hiddenswitch.framework.tests.impl.FrameworkTestBase$Checkpoint cannot be cast to class io.vertx.core.impl.future.FutureInternal (com.hiddenswitch.framework.tests.impl.FrameworkTestBase$Checkpoint and io.vertx.core.impl.future.FutureInternal are in unnamed module of loader 'app')
at io.vertx.core.impl.future.CompositeFutureImpl.init(CompositeFutureImpl.java:67)
at io.vertx.core.impl.future.CompositeFutureImpl.create(CompositeFutureImpl.java:45)
at io.vertx.core.impl.future.CompositeFutureImpl.all(CompositeFutureImpl.java:29)
at io.vertx.core.CompositeFuture.all(CompositeFuture.java:88)
A Checkpoint implements Future<Void> which should be allowed. But this breaks in 4.5 when an instance of Checkpoint is passed to Future.all.
Do you have a reproducer?
Future.all(new Future<Void> { ... });This will fail for any valid user-authored implementation of future.
This works on 4.4.
- Link to github project/gist
Steps to reproduce
- Implement
Futurein a user code class. - Observe that
Future.allwill raise an exception trying to cast Future to FutureInternal. This is unexpected - Implementing FutureInternal resolves the issue.
Reactions are currently unavailable