dennis-yemelyanov commented on code in PR #1781:
URL: https://github.com/apache/cxf/pull/1781#discussion_r1554900848


##########
rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java:
##########
@@ -470,7 +472,7 @@ public WebTarget resolveTemplatesFromEncoded(Map<String, 
Object> templatesMap) {
         private WebTarget newWebTarget(UriBuilder newBuilder) {
             WebClient newClient;
             if (targetClient != null) {
-                newClient = WebClient.fromClient(targetClient);
+                newClient = threadSafeTargetClient ? targetClient : 
WebClient.fromClient(targetClient);

Review Comment:
   ah `WebTarget` must be immutable, I missed that part... I might think more 
if it's possible to separate the externally visible part of it (like the target 
URL) from internal details, so the closeable (and finalizable) part can still 
be reused. But I guess it won't be trivial (if possible at all).
   
   Or we need to adjust some logic from this commit, to ensure different 
instances don't affect each other when finalized 
https://github.com/apache/cxf/commit/5ffdb906b560458ad8df5a892554b6e806d98d9e#diff-660ab7b7b6a7b75d899f2a1cd889b168aadd5a194d2aa9fbae875c1b56891c6c



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to