cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6629] Reverting to using HashMap instead of WeakHashMap as it causes too many side-effects
Date Thu, 08 Oct 2015 09:44:29 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 73a883187 -> 12100800f


[CXF-6629] Reverting to using HashMap instead of WeakHashMap as it causes too many side-effects


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

Branch: refs/heads/3.0.x-fixes
Commit: 12100800fbf439363728a83554ff26c7f575ae54
Parents: 73a8831
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Thu Oct 8 10:41:37 2015 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Thu Oct 8 10:44:13 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/12100800/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
index 805bfa3..d73fe53 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
@@ -29,7 +29,6 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.WeakHashMap;
 import java.util.logging.Logger;
 
 import javax.ws.rs.core.Application;
@@ -209,7 +208,7 @@ public abstract class AbstractResourceInfo {
             property = bus.getProperty(prop);
             if (property == null && create) {
                 Map<Class<?>, Map<T, ThreadLocalProxy<?>>> map
-                    = Collections.synchronizedMap(new WeakHashMap<Class<?>, Map<T,
ThreadLocalProxy<?>>>(2));
+                    = Collections.synchronizedMap(new HashMap<Class<?>, Map<T,
ThreadLocalProxy<?>>>(2));
                 bus.setProperty(prop, map);
                 property = map;
             }
@@ -230,7 +229,7 @@ public abstract class AbstractResourceInfo {
         Object property = bus.getProperty(CONSTRUCTOR_PROXY_MAP);
         if (property == null) {
             Map<Class<?>, Map<Class<?>, ThreadLocalProxy<?>>>
map
-                = Collections.synchronizedMap(new WeakHashMap<Class<?>, Map<Class<?>,
ThreadLocalProxy<?>>>(2));
+                = Collections.synchronizedMap(new HashMap<Class<?>, Map<Class<?>,
ThreadLocalProxy<?>>>(2));
             bus.setProperty(CONSTRUCTOR_PROXY_MAP, map);
             property = map;
         }
@@ -380,7 +379,7 @@ public abstract class AbstractResourceInfo {
                                  V proxy) {
         Map<T, V> proxies = proxyMap.get(serviceClass);
         if (proxies == null) {
-            proxies = Collections.synchronizedMap(new WeakHashMap<T, V>());
+            proxies = Collections.synchronizedMap(new HashMap<T, V>());
             proxyMap.put(serviceClass, proxies);
         }
         if (!proxies.containsKey(f)) {


Mime
View raw message