I want to change the return type of the method below to Future[Unit]
def send(data: Array[Byte]): CompletableFuture[Void] = {
val f:CompletableFuture[Void] = client.send(data)
f
}
I'm using Scala 2.12.1. Is there any convenient way to convert from Java 8 CompletableFuture
to Scala's Future
?