From 944eedbfa4a8687071272efc7f2e14bb07ba7467 Mon Sep 17 00:00:00 2001 From: mdb Date: Tue, 5 Feb 2002 22:25:49 +0000 Subject: [PATCH] If we call next() after a previous call to next() returned null, we need to notice that and continue to return null rather than choking. git-svn-id: https://samskivert.googlecode.com/svn/trunk@564 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../src/java/com/samskivert/jdbc/jora/Cursor.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/projects/samskivert/src/java/com/samskivert/jdbc/jora/Cursor.java b/projects/samskivert/src/java/com/samskivert/jdbc/jora/Cursor.java index 7ad22360..b581211a 100644 --- a/projects/samskivert/src/java/com/samskivert/jdbc/jora/Cursor.java +++ b/projects/samskivert/src/java/com/samskivert/jdbc/jora/Cursor.java @@ -36,6 +36,12 @@ public class Cursor { public Object next() throws SQLException { + // if we closed everything up after the last call to next(), we'll + // have a null table here and should bail immediately + if (table == null) { + return null; + } + // try { do { if (result == null) {