Complete a Promise instead of a Future

Proprietary

Vert.x 4 moved the write side of Future to Promise, and Vert.x 5 removed Future.future(), Future.complete(..), Future.fail(..), Future.completer() and the start(Future) and stop(Future) methods of verticles. A Future that the code completes becomes a Promise: Future.future() becomes Promise.promise(), a verticle's start(Future<Void>) and stop(Future<Void>) become start(Promise<Void>) and stop(Promise<Void>), and so do the Future parameters of private methods that complete them. completer() becomes the promise itself, and promise.future() takes the variable's place wherever it is read as a Future.

io.moderne.vertx.MigrateFutureToPromise
mod run . --recipe=io.moderne.vertx.MigrateFutureToPromise

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.