jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1232474 - in /jackrabbit/branches/2.4: ./ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cache/CacheManager.java
Date Tue, 17 Jan 2012 16:52:32 GMT
Author: jukka
Date: Tue Jan 17 16:52:32 2012
New Revision: 1232474

URL: http://svn.apache.org/viewvc?rev=1232474&view=rev
Log:
2.4: Merged revision 1226863 (JCR-3194)

Modified:
    jackrabbit/branches/2.4/   (props changed)
    jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cache/CacheManager.java

Propchange: jackrabbit/branches/2.4/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 17 16:52:32 2012
@@ -1,3 +1,3 @@
 /jackrabbit/branches/JCR-2272:1173165-1176545
 /jackrabbit/sandbox/JCR-2415-lucene-3.0:1060860-1064038
-/jackrabbit/trunk:1221447,1221579,1221593,1221789,1221818,1225179,1225191,1225196,1225207,1225525,1225528,1226452,1226472,1226515,1226750,1227240,1232100
+/jackrabbit/trunk:1221447,1221579,1221593,1221789,1221818,1225179,1225191,1225196,1225207,1225525,1225528,1226452,1226472,1226515,1226750,1226863,1227240,1232100

Modified: jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cache/CacheManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cache/CacheManager.java?rev=1232474&r1=1232473&r2=1232474&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cache/CacheManager.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cache/CacheManager.java
Tue Jan 17 16:52:32 2012
@@ -161,7 +161,12 @@ public class CacheManager implements Cac
             if (now < nextLogStats) {
                 return;
             }
-            for (Cache cache : caches.keySet()) {
+            // JCR-3194 avoid ConcurrentModificationException
+            List<Cache> list = new ArrayList<Cache>();
+            synchronized (caches) {
+                list.addAll(caches.keySet());
+            }
+            for (Cache cache : list) {
                 log.debug(cache.getCacheInfoAsString());
             }
             nextLogStats = now + minLogStatsInterval;



Mime
View raw message