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] Switching to ConcurrentHashMap
Date Wed, 18 Nov 2015 15:33:16 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 946d2da36 -> 886f14caf


[CXF-6629] Switching to ConcurrentHashMap


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

Branch: refs/heads/master
Commit: 886f14caffba2f4c31f439f4a865f01d955fb8e3
Parents: 946d2da
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Wed Nov 18 15:32:54 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Wed Nov 18 15:32:54 2015 +0000

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/886f14ca/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 d73fe53..1e6dd7e 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,6 +29,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.logging.Logger;
 
 import javax.ws.rs.core.Application;
@@ -208,7 +209,7 @@ public abstract class AbstractResourceInfo {
             property = bus.getProperty(prop);
             if (property == null && create) {
                 Map<Class<?>, Map<T, ThreadLocalProxy<?>>> map
-                    = Collections.synchronizedMap(new HashMap<Class<?>, Map<T,
ThreadLocalProxy<?>>>(2));
+                    = new ConcurrentHashMap<Class<?>, Map<T, ThreadLocalProxy<?>>>(2);
                 bus.setProperty(prop, map);
                 property = map;
             }
@@ -229,7 +230,7 @@ public abstract class AbstractResourceInfo {
         Object property = bus.getProperty(CONSTRUCTOR_PROXY_MAP);
         if (property == null) {
             Map<Class<?>, Map<Class<?>, ThreadLocalProxy<?>>>
map
-                = Collections.synchronizedMap(new HashMap<Class<?>, Map<Class<?>,
ThreadLocalProxy<?>>>(2));
+                = new ConcurrentHashMap<Class<?>, Map<Class<?>, ThreadLocalProxy<?>>>(2);
             bus.setProperty(CONSTRUCTOR_PROXY_MAP, map);
             property = map;
         }
@@ -379,7 +380,7 @@ public abstract class AbstractResourceInfo {
                                  V proxy) {
         Map<T, V> proxies = proxyMap.get(serviceClass);
         if (proxies == null) {
-            proxies = Collections.synchronizedMap(new HashMap<T, V>());
+            proxies = new ConcurrentHashMap<T, V>();
             proxyMap.put(serviceClass, proxies);
         }
         if (!proxies.containsKey(f)) {


Mime
View raw message