jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From un...@apache.org
Subject svn commit: r1643091 - /jackrabbit/trunk/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/data/LocalCache.java
Date Mon, 15 Dec 2014 17:12:27 GMT
Author: unico
Date: Wed Dec  3 10:56:14 2014
New Revision: 1643091

URL: http://svn.apache.org/r1643091
Log:
JCR-3833 LinkedHashMap#entrySet#iterator#remove no longer calls LinkedHashMap#remove, however
LocalCache relies on that when it overrides the #remove method.
Note that this issue did not turn up during running the tests because TestLocalCache#testAutoPurge
is disabled due to JCR-3806...

Modified:
    jackrabbit/trunk/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/data/LocalCache.java

Modified: jackrabbit/trunk/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/data/LocalCache.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/data/LocalCache.java?rev=1643091&r1=1643090&r2=1643091&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/data/LocalCache.java
(original)
+++ jackrabbit/trunk/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/data/LocalCache.java
Wed Dec  3 10:56:14 2014
@@ -572,7 +572,8 @@ public class LocalCache {
                         Map.Entry<String, Long> entry = itr.next();
                         if (entry.getKey() != null) {
                             if (cache.currentSizeInBytes > cache.cachePurgeResize) {
-                                itr.remove();
+                                cache.remove(entry.getKey());
+                                itr = cache.entrySet().iterator();
                             } else {
                                 break;
                             }



Mime
View raw message