Details
-
Task
-
Status: Closed (View Workflow)
-
P2
-
Resolution: Done
-
None
-
-
CP: sprint 79, CP: sprint 87
-
3
-
Core: Platform
Description
In newer RMB release the Vert.x version has been incremented. Since Vert.x update some Future methods became deprecated.
In data-import modules most business-logic is written in composed manner using Future methods. The code is tightly coupled with Future class, that obviously requires a huge rework of existing code base.
These Future methods haven been deprecated and will be removed in Vertx 4.
Quote from https://github.com/vert-x3/wiki/wiki/3.8.0-Deprecations-and-breaking-changes#future-creation-and-completion :
// Deprecated Future<String> fut = Future.future(); vertx.setTimer(1000, id -> fut.complete("hello"); return fut; // Now you should do this Promise<String> promise = Promise.promise(); vertx.setTimer(1000, id -> promise.complete("hello"); return promise.future();
Creating and completing futures is deprecated in Vert.x 3.8 in favor of promises.
☑️ Future setHandler method pruning
https://github.com/eclipse-vertx/vert.x/issues/3329
Vert.x supports multiple handler per future in 4.0. The setHandler method does convey the meaning that a single handler per future can be set and unset and the onComplete, onSuccess, onFailure methods shall be used instead.
The setHandler method usage must be replaced by the onComplete method, e.g
// Before Future<String> fut = getSomeFuture(); fut.setHandler(ar -> ...); // After Future<String> fut = getSomeFuture(); fut.onComplete(ar -> ...);
Vert.x 3.9 deprecates setHandler.
☑️ Future completer method pruning
https://github.com/eclipse-vertx/vert.x/issues/2869
The Future#completer() method is deprecated since Future<T> extends Handler<AsyncResult<T>> for some time now (and the default implementation actually returns this).
TestRail: Results
Attachments
Issue Links
- blocks
-
UXPROD-2206 RMB vert.x 4 migration
-
- Open
-
- relates to
-
RMB-464 Upgrade to Vert.x 3.8.1
-
- Closed
-
-
RMB-697 Explain Vert.x 4 futurisation
-
- Closed
-
-
RMB-520 Fix code smells
-
- Open
-
-
RMB-601 PgUtil futurisation for Vert.x 4
-
- Closed
-
-
RMB-602 PostgresClient futurisation for Vert.x 4, Part 1
-
- Closed
-
-
RMB-814 PostgresClient futurisation for Vert.x 4, Part 2
-
- Closed
-