diff --git a/src/main/java/io/vertx/core/eventbus/impl/EventBusImpl.java b/src/main/java/io/vertx/core/eventbus/impl/EventBusImpl.java index c889da21e0d..258f44be5f8 100644 --- a/src/main/java/io/vertx/core/eventbus/impl/EventBusImpl.java +++ b/src/main/java/io/vertx/core/eventbus/impl/EventBusImpl.java @@ -430,13 +430,13 @@ public void sendOrPubInternal(MessageImpl message, DeliveryOptions options, private Future unregisterAll() { // Unregister all handlers explicitly - don't rely on context hooks - List futures = new ArrayList<>(); + List> futures = new ArrayList<>(); for (ConcurrentCyclicSequence handlers : handlerMap.values()) { for (HandlerHolder holder : handlers) { futures.add(holder.getHandler().unregister()); } } - return CompositeFuture.join(futures).mapEmpty(); + return Future.join(futures).mapEmpty(); } private void addInterceptor(AtomicReferenceFieldUpdater updater, Handler interceptor) { diff --git a/src/main/java/io/vertx/core/impl/DeploymentManager.java b/src/main/java/io/vertx/core/impl/DeploymentManager.java index 50d97b91ba3..177f2c81c3f 100644 --- a/src/main/java/io/vertx/core/impl/DeploymentManager.java +++ b/src/main/java/io/vertx/core/impl/DeploymentManager.java @@ -12,7 +12,6 @@ package io.vertx.core.impl; import io.vertx.core.AsyncResult; -import io.vertx.core.CompositeFuture; import io.vertx.core.Context; import io.vertx.core.DeploymentOptions; import io.vertx.core.Future; @@ -101,7 +100,7 @@ public Future undeployAll() { deploymentIDs.add(entry.getKey()); } } - List completionList = new ArrayList<>(); + List> completionList = new ArrayList<>(); if (!deploymentIDs.isEmpty()) { for (String deploymentID : deploymentIDs) { Promise promise = Promise.promise(); @@ -115,7 +114,7 @@ public Future undeployAll() { }); } Promise promise = vertx.getOrCreateContext().promise(); - CompositeFuture.join(completionList).mapEmpty().onComplete(promise); + Future.join(completionList).mapEmpty().onComplete(promise); return promise.future(); } else { return vertx.getOrCreateContext().succeededFuture(); @@ -302,16 +301,16 @@ private synchronized void rollback(ContextInternal callingContext, Handler doUndeployChildren(ContextInternal undeployingContext) { if (!children.isEmpty()) { - List childFuts = new ArrayList<>(); + List> undeployFutures = new ArrayList<>(); for (Deployment childDeployment: new HashSet<>(children)) { Promise p = Promise.promise(); - childFuts.add(p.future()); + undeployFutures.add(p.future()); childDeployment.doUndeploy(undeployingContext).onComplete(ar -> { children.remove(childDeployment); p.handle(ar); }); } - return CompositeFuture.all(childFuts).mapEmpty(); + return Future.all(undeployFutures).mapEmpty(); } else { return Future.succeededFuture(); } @@ -326,13 +325,13 @@ public synchronized Future doUndeploy(ContextInternal undeployingContext) return doUndeployChildren(undeployingContext).compose(v -> doUndeploy(undeployingContext)); } else { status = ST_UNDEPLOYED; - List undeployFutures = new ArrayList<>(); + List> undeployFutures = new ArrayList<>(); if (parent != null) { parent.removeChild(this); } for (VerticleHolder verticleHolder: verticles) { ContextBase context = verticleHolder.context; - Promise p = Promise.promise(); + Promise p = Promise.promise(); undeployFutures.add(p.future()); context.runOnContext(v -> { Promise stopPromise = undeployingContext.promise(); @@ -361,7 +360,7 @@ public synchronized Future doUndeploy(ContextInternal undeployingContext) }); } Promise resolvingPromise = undeployingContext.promise(); - CompositeFuture.all(undeployFutures).mapEmpty().onComplete(resolvingPromise); + Future.all(undeployFutures).mapEmpty().onComplete(resolvingPromise); Future fut = resolvingPromise.future(); Handler handler = undeployHandler; if (handler != null) {