Skip to content

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

applied patch from http://www.yacy-forum.de/viewtopic.php?p=27392#27392

orbiter16f88c49d9e6
diff --git a/source/de/anomic/kelondro/kelondroFlexSplitTable.java b/source/de/anomic/kelondro/kelondroFlexSplitTable.java
index 8c2864f12..5291013f3 100644
--- a/source/de/anomic/kelondro/kelondroFlexSplitTable.java
+++ b/source/de/anomic/kelondro/kelondroFlexSplitTable.java
@@ -272,21 +272,18 @@ public class kelondroFlexSplitTable implements kelondroIndex {
}
public Object next() {
- if (t.hasNext()) {
- if ((tt == null) || (!(tt.hasNext()))) {
- try {
- tt = ((kelondroIndex) t.next()).rows(true, false, null);
- } catch (IOException e) {
- return null;
- }
- }
- if (tt.hasNext()) {
- return tt.next();
- } else {
+ if ((tt == null) || (!(tt.hasNext()))) {
+ try {
+ tt = ((kelondroIndex) t.next()).rows(true, false, null);
+ } catch (IOException e) {
return null;
}
}
- return null;
+ if (tt.hasNext()) {
+ return tt.next();
+ } else {
+ return this.next(); // t is empty, try next table
+ }
}
public void remove() {