Skip to content

Commit

Permalink
[SDCISA-12877] Use Future to replace custom SucceededAsyncResult impl…
Browse files Browse the repository at this point in the history
… as requested in review
  • Loading branch information
hiddenalpha committed Jul 27, 2023
1 parent 5f796ac commit 15d4b9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 34 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
import io.vertx.core.MultiMap;
import io.vertx.core.Vertx;
import io.vertx.core.http.*;
import org.swisspush.gateleen.core.event.SucceededAsyncResult;

import java.util.List;
import java.util.function.Function;

import static io.vertx.core.Future.succeededFuture;

/**
* Base class with empty method implementations.
*
Expand Down Expand Up @@ -98,7 +99,7 @@ public Future<HttpClientRequest> request(HttpMethod httpMethod, String s, String

@Override
public void request(HttpMethod method, String requestURI, Handler<AsyncResult<HttpClientRequest>> handler) {
vertx.runOnContext(v -> handler.handle(new SucceededAsyncResult<>(doRequest(method, requestURI))));
vertx.runOnContext(v -> succeededFuture(doRequest(method, requestURI)).onComplete(handler));
}

@Override
Expand Down

0 comments on commit 15d4b9f

Please sign in to comment.