diff --git a/gravitee-node-reporter/src/main/java/io/gravitee/node/reporter/vertx/eventbus/EventBusReporterWrapper.java b/gravitee-node-reporter/src/main/java/io/gravitee/node/reporter/vertx/eventbus/EventBusReporterWrapper.java index 468f09a69..890b3a1e3 100644 --- a/gravitee-node-reporter/src/main/java/io/gravitee/node/reporter/vertx/eventbus/EventBusReporterWrapper.java +++ b/gravitee-node-reporter/src/main/java/io/gravitee/node/reporter/vertx/eventbus/EventBusReporterWrapper.java @@ -55,26 +55,20 @@ public Lifecycle.State lifecycleState() { } @Override - public Object start() throws Exception { + public Reporter start() { vertx.executeBlocking( - new Handler>() { - @Override - public void handle(Promise event) { - try { - reporter.start(); - event.complete(reporter); - } catch (Exception ex) { - logger.error("Error while starting reporter", ex); - event.fail(ex); - } + event -> { + try { + reporter.start(); + event.complete(reporter); + } catch (Exception ex) { + logger.error("Error while starting reporter", ex); + event.fail(ex); } }, - new Handler>() { - @Override - public void handle(AsyncResult event) { - if (event.succeeded()) { - vertx.eventBus().consumer(EVENT_BUS_ADDRESS, EventBusReporterWrapper.this); - } + event -> { + if (event.succeeded()) { + vertx.eventBus().consumer(EVENT_BUS_ADDRESS, EventBusReporterWrapper.this); } } ); @@ -83,7 +77,7 @@ public void handle(AsyncResult event) { } @Override - public Object stop() throws Exception { + public Reporter stop() throws Exception { return reporter.stop(); } diff --git a/pom.xml b/pom.xml index a072bae0c..844242d76 100644 --- a/pom.xml +++ b/pom.xml @@ -251,7 +251,7 @@ 1.25.0 1.23.1 1.9.2 - 1.24.1 + 1.25.0-alpha.4 1.0.0 2.0.0 1.30