cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: [CXF-6066] Using WeakHashMap for referencing WebTargets, thanks to Hartmut Lang
Date Tue, 28 Oct 2014 12:41:16 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 8c5acf358 -> e56023e64


[CXF-6066] Using WeakHashMap for referencing WebTargets, thanks to Hartmut Lang


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/e56023e6
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e56023e6
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e56023e6

Branch: refs/heads/master
Commit: e56023e64c959680f11d3ec212b72995f25b1251
Parents: 8c5acf3
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Tue Oct 28 12:40:53 2014 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Tue Oct 28 12:40:53 2014 +0000

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/e56023e6/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java
----------------------------------------------------------------------
diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java
index 88d7317..ba9dc23 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java
@@ -19,11 +19,12 @@
 package org.apache.cxf.jaxrs.client.spec;
 
 import java.net.URI;
-import java.util.HashSet;
+import java.util.Collections;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.WeakHashMap;
 
 import javax.net.ssl.HostnameVerifier;
 import javax.net.ssl.SSLContext;
@@ -49,7 +50,8 @@ public class ClientImpl implements Client {
     private Configurable<Client> configImpl;
     private TLSConfiguration secConfig;
     private boolean closed;
-    private Set<WebClient> baseClients = new HashSet<WebClient>();
+    private Set<WebClient> baseClients = 
+        Collections.newSetFromMap(new WeakHashMap<WebClient, Boolean>());
     public ClientImpl(Configuration config,
                       TLSConfiguration secConfig) {
         configImpl = new ClientConfigurableImpl<Client>(this, config);


Mime
View raw message