From a3d6fa18afb54f4cd98b6c2f597f56423e99d754 Mon Sep 17 00:00:00 2001 From: tvallin Date: Fri, 16 Jun 2023 10:51:06 +0200 Subject: [PATCH 1/2] Use current context Signed-off-by: tvallin --- .../io/helidon/nima/webclient/http1/ClientRequestImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nima/webclient/webclient/src/main/java/io/helidon/nima/webclient/http1/ClientRequestImpl.java b/nima/webclient/webclient/src/main/java/io/helidon/nima/webclient/http1/ClientRequestImpl.java index 6a99f0c6263..28f0e47f557 100644 --- a/nima/webclient/webclient/src/main/java/io/helidon/nima/webclient/http1/ClientRequestImpl.java +++ b/nima/webclient/webclient/src/main/java/io/helidon/nima/webclient/http1/ClientRequestImpl.java @@ -27,6 +27,7 @@ import io.helidon.common.buffers.BufferData; import io.helidon.common.context.Context; +import io.helidon.common.context.Contexts; import io.helidon.common.http.ClientRequestHeaders; import io.helidon.common.http.Http; import io.helidon.common.http.Http.HeaderValue; @@ -332,7 +333,7 @@ private ClientResponseImpl invokeServices(WebClientService.Chain callChain, query, UriFragment.empty(), headers, - Context.create(), + Contexts.context().orElse(Context.create()), requestId, whenComplete, whenSent, From b30b44801328c3fd7c4ac8d47a1ba20b931b3f2d Mon Sep 17 00:00:00 2001 From: tvallin Date: Tue, 20 Jun 2023 15:35:12 +0200 Subject: [PATCH 2/2] review changes Signed-off-by: tvallin --- .../java/io/helidon/nima/webclient/http1/ClientRequestImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nima/webclient/webclient/src/main/java/io/helidon/nima/webclient/http1/ClientRequestImpl.java b/nima/webclient/webclient/src/main/java/io/helidon/nima/webclient/http1/ClientRequestImpl.java index 28f0e47f557..6d65a0cdd21 100644 --- a/nima/webclient/webclient/src/main/java/io/helidon/nima/webclient/http1/ClientRequestImpl.java +++ b/nima/webclient/webclient/src/main/java/io/helidon/nima/webclient/http1/ClientRequestImpl.java @@ -333,7 +333,7 @@ private ClientResponseImpl invokeServices(WebClientService.Chain callChain, query, UriFragment.empty(), headers, - Contexts.context().orElse(Context.create()), + Contexts.context().orElseGet(Context::create), requestId, whenComplete, whenSent,