From b251076e64405529d1bc8594abcd1d9d77ced0f5 Mon Sep 17 00:00:00 2001 From: orbiter Date: Wed, 13 Sep 2006 10:36:18 +0000 Subject: [PATCH] avoid ConcurrentModificationException git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2563 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaHTCache.java | 2 ++ 1 file changed, 2 insertions(+) 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() {