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
pull/1/head
danielr 17 years ago
parent a99a629ed4
commit a4fb76e93c

@ -314,29 +314,25 @@ public final class indexContainerHeap {
return new heapCacheIterator((String) secondWordHash, rot); return new heapCacheIterator((String) secondWordHash, rot);
} }
public synchronized boolean hasNext() { public boolean hasNext() {
if (rot) return true; if (rot) return true;
return iterator.hasNext(); return iterator.hasNext();
} }
public synchronized indexContainer next() { public indexContainer next() {
synchronized(iterator) { if (iterator.hasNext()) {
if (iterator.hasNext()) {
return (iterator.next()).topLevelClone();
}
// rotation iteration
if (!rot) {
return null;
}
iterator = cache.values().iterator();
return (iterator.next()).topLevelClone(); return (iterator.next()).topLevelClone();
} }
// rotation iteration
if (!rot) {
return null;
}
iterator = cache.values().iterator();
return (iterator.next()).topLevelClone();
} }
public synchronized void remove() { public void remove() {
synchronized(iterator) { iterator.remove();
iterator.remove();
}
} }
public Iterator<indexContainer> iterator() { public Iterator<indexContainer> iterator() {

Loading…
Cancel
Save