Author: tolusha
Date: 2012-03-30 04:35:05 -0400 (Fri, 30 Mar 2012)
New Revision: 5996
Added:
jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1729/
jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1729/JCR-1729.patch
Log:
JCR-1729: patch proposed
Added: jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1729/JCR-1729.patch
===================================================================
--- jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1729/JCR-1729.patch
(rev 0)
+++ jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1729/JCR-1729.patch 2012-03-30 08:35:05 UTC
(rev 5996)
@@ -0,0 +1,45 @@
+Index:
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java
+===================================================================
+---
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java (revision
5970)
++++
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java (working
copy)
+@@ -43,9 +43,9 @@
+ import java.io.Serializable;
+ import java.security.PrivilegedAction;
+ import java.util.HashMap;
++import java.util.Iterator;
+ import java.util.Map;
+ import java.util.Map.Entry;
+-import java.util.concurrent.ConcurrentHashMap;
+
+ import javax.management.ObjectName;
+ import javax.transaction.TransactionManager;
+@@ -284,7 +284,7 @@
+ Map<ConfigurationKey, CacheInstance> caches = allCacheTypes.get(cacheType);
+ if (caches == null)
+ {
+- caches = new ConcurrentHashMap<ConfigurationKey, CacheInstance>();
++ caches = new HashMap<ConfigurationKey, CacheInstance>();
+ allCacheTypes.put(cacheType, caches);
+ }
+ Configuration cfg = cache.getConfiguration();
+@@ -334,8 +334,10 @@
+ Map<CacheType, Map<ConfigurationKey, CacheInstance>> allCacheTypes =
CACHES.get(container);
+ Map<ConfigurationKey, CacheInstance> caches = allCacheTypes.get(cacheType);
+
+- for (Entry<ConfigurationKey, CacheInstance> entry : caches.entrySet())
++ for (Iterator<Entry<ConfigurationKey, CacheInstance>> it =
caches.entrySet().iterator(); it.hasNext();)
+ {
++ Entry<ConfigurationKey, CacheInstance> entry = it.next();
++
+ CacheInstance cacheInstance = entry.getValue();
+ if (cacheInstance.isSame(cache))
+ {
+@@ -343,7 +345,7 @@
+
+ if (!cacheInstance.hasReferences())
+ {
+- caches.remove(entry.getKey());
++ it.remove();
+ PrivilegedJBossCacheHelper.stop((Cache<Serializable,
Object>)cache);
+ }
+ }
Show replies by date