You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by GitBox <gi...@apache.org> on 2018/04/26 16:05:25 UTC

[GitHub] rmannibucau commented on a change in pull request #409: CXF-7710: ClientImpl is memory-leak prone

rmannibucau commented on a change in pull request #409: CXF-7710: ClientImpl is memory-leak prone
URL: https://github.com/apache/cxf/pull/409#discussion_r184445267
 
 

 ##########
 File path: core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
 ##########
 @@ -1083,12 +1087,29 @@ public void clear() {
         }
     }
 
-
     public void setExecutor(Executor executor) {
         if (!SynchronousExecutor.isA(executor)) {
             this.executor = executor;
         }
     }
 
+    /**
+     * Returns the current thread name. As this value will be used as a key in a {@link WeakHashMap},
+     * we should use the String constructor for avoiding scenarios where strong references are kept
+     * to the string names causing that the map entries can't be garbage collected.
+     * @return
+     */
+    private String getThreadName() {
 
 Review comment:
   you probably want to use the thread id and not the name which doesn't have to be unique?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services