Source:
<code>protected Vertx startVertx() { <START> JsonObject optionsJson = getJsonFromFileOrString(vertxOptions, "vertx-options"); <END> if (optionsJson == null) { MetricsOptions metricsOptions = getMetricsOptions(); options = new VertxOptions().setMetricsOptions(metricsOptions); } else { MetricsOptions metricsOptions = getMetricsOptions(optionsJson.getJsonObject("metricsOptions")); options = new VertxOptions(optionsJson).setMetricsOptions(metricsOptions); } configureFromSystemProperties(options, VERTX_OPTIONS_PROP_PREFIX); beforeStartingVertx(options); Vertx instance; if (isClustered()) { log.info("Starting clustering..."); if (!options.getClusterHost().equals(VertxOptions.DEFAULT_CLUSTER_HOST)) { clusterHost = options.getClusterHost(); } if (options.getClusterPort() != VertxOptions.DEFAULT_CLUSTER_PORT) { clusterPort = options.getClusterPort(); } if (clusterHost == null) { clusterHost = getDefaultAddress(); if (clusterHost == null) { log.error("Unable to find a default network interface for clustering. Please specify one using -cluster-host"); return null; } else { log.info("No cluster-host specified so using address " + clusterHost); } } CountDownLatch latch = new CountDownLatch(1); AtomicReference<AsyncResult<Vertx>> result = new AtomicReference<>(); options.setClusterHost(clusterHost).setClusterPort(clusterPort).setClustered(true); if (getHA()) { options.setHAEnabled(true); if (haGroup != null) { options.setHAGroup(haGroup); } if (quorum != -1) { options.setQuorumSize(quorum); } } create(options, ar -> { result.set(ar); latch.countDown(); }); try { if (!latch.await(2, TimeUnit.MINUTES)) { log.error("Timed out in starting clustered Vert.x"); return null; } } catch (InterruptedException e) { log.error("Thread interrupted in startup"); Thread.currentThread().interrupt(); return null; } if (result.get().failed()) { log.error("Failed to form cluster"); result.get().cause().printStackTrace(); return null; } instance = result.get().result(); } else { instance = create(options); } addShutdownHook(instance, log, finalAction); afterStartingVertx(instance); return instance; }</code><technical_language>updated name is finalized</technical_language>

Target:
protected Vertx startVertx() { JsonObject optionsJson = getJsonFromFileOrString(vertxOptions, "options"); if (optionsJson == null) { MetricsOptions metricsOptions = getMetricsOptions(); options = new VertxOptions().setMetricsOptions(metricsOptions); } else { MetricsOptions metricsOptions = getMetricsOptions(optionsJson.getJsonObject("metricsOptions")); options = new VertxOptions(optionsJson).setMetricsOptions(metricsOptions); } configureFromSystemProperties(options, VERTX_OPTIONS_PROP_PREFIX); beforeStartingVertx(options); Vertx instance; if (isClustered()) { log.info("Starting clustering..."); if (!options.getClusterHost().equals(VertxOptions.DEFAULT_CLUSTER_HOST)) { clusterHost = options.getClusterHost(); } if (options.getClusterPort() != VertxOptions.DEFAULT_CLUSTER_PORT) { clusterPort = options.getClusterPort(); } if (clusterHost == null) { clusterHost = getDefaultAddress(); if (clusterHost == null) { log.error("Unable to find a default network interface for clustering. Please specify one using -cluster-host"); return null; } else { log.info("No cluster-host specified so using address " + clusterHost); } } CountDownLatch latch = new CountDownLatch(1); AtomicReference<AsyncResult<Vertx>> result = new AtomicReference<>(); options.setClusterHost(clusterHost).setClusterPort(clusterPort).setClustered(true); if (getHA()) { options.setHAEnabled(true); if (haGroup != null) { options.setHAGroup(haGroup); } if (quorum != -1) { options.setQuorumSize(quorum); } } create(options, ar -> { result.set(ar); latch.countDown(); }); try { if (!latch.await(2, TimeUnit.MINUTES)) { log.error("Timed out in starting clustered Vert.x"); return null; } } catch (InterruptedException e) { log.error("Thread interrupted in startup"); Thread.currentThread().interrupt(); return null; } if (result.get().failed()) { log.error("Failed to form cluster"); result.get().cause().printStackTrace(); return null; } instance = result.get().result(); } else { instance = create(options); } addShutdownHook(instance, log, finalAction); afterStartingVertx(instance); return instance; }