Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

another bugfix to the correctedNodeIterator

orbiter38b19ff56aab
diff --git a/source/de/anomic/kelondro/kelondroTree.java b/source/de/anomic/kelondro/kelondroTree.java
index cc273a7f4..2948a1930 100644
--- a/source/de/anomic/kelondro/kelondroTree.java
+++ b/source/de/anomic/kelondro/kelondroTree.java
@@ -816,18 +816,10 @@ public class kelondroTree extends kelondroRecords implements kelondroIndex {
Iterator ii;
Node nextNode;
boolean asc, rot;
- Node start;
- byte[] firstKey;
-
+
public correctedNodeIterator(boolean up, boolean rotating, Node start, byte[] firstKey) throws IOException {
- asc = up;
- rot = rotating;
- this.start = start;
- this.firstKey = firstKey;
- init();
- }
-
- private void init() throws IOException {
+ this.asc = up;
+ this.rot = rotating;
ii = new nodeIterator(asc, rot, start);
nextNode = (ii.hasNext()) ? (Node) ii.next() : null;
if (nextNode != null) {
@@ -859,7 +851,7 @@ public class kelondroTree extends kelondroRecords implements kelondroIndex {
// correct wrong order (this should not happen)
if (rot) {
try {
- init();
+ ii = new nodeIterator(asc, rot);
} catch (IOException e) {
nextNode = null;
}
@@ -872,7 +864,7 @@ public class kelondroTree extends kelondroRecords implements kelondroIndex {
public void remove() {
throw new java.lang.UnsupportedOperationException("kelondroTree: remove in kelondro Tables not yet supported");
- }
+ }
}
private class nodeIterator implements Iterator {