From a4fb76e93c23722c96d5ab819f820373b5f406b8 Mon Sep 17 00:00:00 2001 From: danielr Date: Sat, 25 Oct 2008 23:20:09 +0000 Subject: [PATCH] undo r5300 (not fixed as seen after longer run) git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5303 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- .../de/anomic/index/indexContainerHeap.java | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/source/de/anomic/index/indexContainerHeap.java b/source/de/anomic/index/indexContainerHeap.java index 07d24aad0..2d7ba8f1f 100755 --- a/source/de/anomic/index/indexContainerHeap.java +++ b/source/de/anomic/index/indexContainerHeap.java @@ -314,29 +314,25 @@ public final class indexContainerHeap { return new heapCacheIterator((String) secondWordHash, rot); } - public synchronized boolean hasNext() { + public boolean hasNext() { if (rot) return true; return iterator.hasNext(); } - public synchronized indexContainer next() { - synchronized(iterator) { - if (iterator.hasNext()) { - return (iterator.next()).topLevelClone(); - } - // rotation iteration - if (!rot) { - return null; - } - iterator = cache.values().iterator(); + public indexContainer next() { + if (iterator.hasNext()) { return (iterator.next()).topLevelClone(); } + // rotation iteration + if (!rot) { + return null; + } + iterator = cache.values().iterator(); + return (iterator.next()).topLevelClone(); } - public synchronized void remove() { - synchronized(iterator) { - iterator.remove(); - } + public void remove() { + iterator.remove(); } public Iterator iterator() {