Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

avoid ConcurrentModificationException

orbiterb251076e6440
diff --git a/source/de/anomic/plasma/plasmaHTCache.java b/source/de/anomic/plasma/plasmaHTCache.java
index 99b3bf474..331410332 100644
--- a/source/de/anomic/plasma/plasmaHTCache.java
+++ b/source/de/anomic/plasma/plasmaHTCache.java
@@ -328,6 +328,7 @@ public final class plasmaHTCache {
private void cleanupDoIt(long newCacheSize) {
File obj;
+ synchronized (cacheAge) {
Iterator iter = this.cacheAge.keySet().iterator();
while (iter.hasNext() && this.curCacheSize >= newCacheSize) {
Object key = iter.next();
@@ -349,6 +350,7 @@ public final class plasmaHTCache {
}
iter.remove();
}
+ }
}
private void cleanup() {