cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: Replacing a strong map of jaxrs context proxies with a weak hash map
Date Fri, 04 Jul 2014 10:31:06 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes bf78d113b -> 3997e7ad2


Replacing a strong map of jaxrs context proxies with a weak hash map


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

Branch: refs/heads/2.7.x-fixes
Commit: 3997e7ad2ab3a696cef8b1d13cf3af0066604e91
Parents: bf78d11
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Fri Jul 4 11:30:29 2014 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Fri Jul 4 11:30:29 2014 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/3997e7ad/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 f3577a6..fe6f5ac 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
@@ -27,7 +27,7 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
+import java.util.WeakHashMap;
 
 import javax.annotation.Resource;
 import javax.ws.rs.core.Application;
@@ -170,7 +170,7 @@ public abstract class AbstractResourceInfo {
             property = bus.getProperty(prop);
             if (property == null) {
                 Map<Class<?>, Map<T, ThreadLocalProxy<?>>> map
-                    = new ConcurrentHashMap<Class<?>, Map<T, ThreadLocalProxy<?>>>(2);
+                    = Collections.synchronizedMap(new WeakHashMap<Class<?>, Map<T,
ThreadLocalProxy<?>>>(2));
                 bus.setProperty(prop, map);
                 property = map;
             }


Mime
View raw message