another bugfix to the correctedNodeIterator

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1314 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent 45c44ca9c8
commit 38b19ff56a

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

Loading…
Cancel
Save