avoid ConcurrentModificationException

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2563 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent 99699a4d70
commit b251076e64

@ -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();
@ -350,6 +351,7 @@ public final class plasmaHTCache {
iter.remove();
}
}
}
private void cleanup() {
// clean up cache to have 4% (enough) space for next entries

Loading…
Cancel
Save