Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
fix for missing topLevelClone in indexRAMCacheRI.wordContainerIterator
orbiter0b7112f8b21a
diff --git a/source/de/anomic/index/indexRAMCacheRI.java b/source/de/anomic/index/indexRAMCacheRI.javaindex 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 iterationif (rot) {- iterator = wCache.tailMap(startHash).values().iterator();- return iterator.next();+ iterator = wCache.values().iterator();+ return ((indexContainer) iterator.next()).topLevelClone();} else {return null;}