From 0b7112f8b21aadc9316b91700634d4227259d64c Mon Sep 17 00:00:00 2001 From: orbiter Date: Wed, 2 Aug 2006 00:43:03 +0000 Subject: [PATCH] fix for missing topLevelClone in indexRAMCacheRI.wordContainerIterator git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2340 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/index/indexRAMCacheRI.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/source/de/anomic/index/indexRAMCacheRI.java b/source/de/anomic/index/indexRAMCacheRI.java index 04540aa5a..e1f3aa188 100644 --- a/source/de/anomic/index/indexRAMCacheRI.java +++ b/source/de/anomic/index/indexRAMCacheRI.java @@ -290,12 +290,10 @@ public final class indexRAMCacheRI extends indexAbstractRI implements indexRI { private boolean rot; private Iterator iterator; - private String startHash; public wordContainerIterator(String startWordHash, boolean rot) { this.rot = rot; - this.startHash = startWordHash; - this.iterator = wCache.tailMap(startWordHash).values().iterator(); + this.iterator = (startWordHash == null) ? wCache.values().iterator() : wCache.tailMap(startWordHash).values().iterator(); // The collection's iterator will return the values in the order that their corresponding keys appear in the tree. } @@ -306,12 +304,12 @@ public final class indexRAMCacheRI extends indexAbstractRI implements indexRI { public Object next() { if (iterator.hasNext()) { - return iterator.next(); + return ((indexContainer) iterator.next()).topLevelClone(); } else { // rotation iteration if (rot) { - iterator = wCache.tailMap(startHash).values().iterator(); - return iterator.next(); + iterator = wCache.values().iterator(); + return ((indexContainer) iterator.next()).topLevelClone(); } else { return null; }