Documentation for Future.toJava is stricter than implemented functionality
jypma opened this issue · 1 comments
jypma commented
It says here that the CompletionStage
returned by FutureConverters
doesn't support the toCompletableFuture()
interface at all. However, it can be used fine to retrieve the value of a completed future, and/or wait for it. That functionality is currently used by e.g. akka.
The documentation could probably be extended to reflect that waiting / getting is fine, but completing is not.
jypma commented
Actually, if the behaviour is indeed correct, it might even make sense to upgrade the return type to either CompletableFuture
, or to a sub-interface of CompletionStage
that happens to have the CompletableFuture
methods that are supported.