diff --git a/vertx-config/src/main/java/io/vertx/config/impl/ConfigRetrieverImpl.java b/vertx-config/src/main/java/io/vertx/config/impl/ConfigRetrieverImpl.java index 041cb2c0..6fde696f 100644 --- a/vertx-config/src/main/java/io/vertx/config/impl/ConfigRetrieverImpl.java +++ b/vertx-config/src/main/java/io/vertx/config/impl/ConfigRetrieverImpl.java @@ -257,12 +257,12 @@ private Future compute() { .map(s -> s.get(context.owner())) .collect(Collectors.toList()); - return Future.all(futures).map(compositeFuture -> { + return context.succeededFuture().compose(v -> Future.all(futures).map(compositeFuture -> { // Merge the different futures JsonObject json = new JsonObject(); futures.forEach(future -> json.mergeIn((JsonObject) future.result(), true)); return json; - }).map(json -> processor != null ? processor.apply(json) : json); + }).map(json -> processor != null ? processor.apply(json) : json)); } /**