From 16f88c49d9e6c33bfa331edb92c4cb04983393b7 Mon Sep 17 00:00:00 2001 From: orbiter Date: Sat, 23 Dec 2006 02:34:57 +0000 Subject: [PATCH] applied patch from http://www.yacy-forum.de/viewtopic.php?p=27392#27392 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3130 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- .../kelondro/kelondroFlexSplitTable.java | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) 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() {