reta commented on code in PR #1380:
URL: https://github.com/apache/cxf/pull/1380#discussion_r1292355008


##########
rt/transports/http/src/main/java/org/apache/cxf/transport/http/HttpClientHTTPConduit.java:
##########
@@ -303,19 +303,34 @@ protected OutputStream createOutputStream(Message 
message, boolean needToCacheRe
      * This class <i>must</i> be static so it doesn't capture a reference to 
{@code HttpClientHTTPConduit.this} and
      * through that to {@link HttpClientHTTPConduit#client}. Otherwise the 
client can never be garbage collected, which
      * means that the companion "SelectorManager" thread keeps running 
indefinitely (see CXF-8885).
+     * <p>
+     * The {@link HTTPClientPolicy} must be copied here because its property 
change listeners can still have hard
+     * references to the {@code HttpClientHTTPConduit}.
      */
     private static final class ProxyFactoryProxySelector extends ProxySelector 
{
         private final ProxyFactory proxyFactory;
-        private final HTTPClientPolicy csPolicy;
+        private final HTTPClientPolicy clientPolicy;
 
         ProxyFactoryProxySelector(ProxyFactory proxyFactory, HTTPClientPolicy 
csPolicy) {
             this.proxyFactory = proxyFactory;
-            this.csPolicy = csPolicy;
+            this.clientPolicy = new HTTPClientPolicy();

Review Comment:
   Thank you @LeoWoerteler , I think it is sufficient to see the problem, will 
try to look shortly



-- 
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: dev-unsubscr...@cxf.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to