From 94edbae8a29afd61bfd7671851bce3d5b4f1075d Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Wed, 27 Dec 2006 02:25:14 +0000 Subject: More JDBC cursor skip bug fixes. --- .../com/amazon/carbonado/repo/jdbc/JDBCCursor.java | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'src/main/java/com/amazon/carbonado') diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCCursor.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCCursor.java index fc9430d..f419c0d 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCCursor.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCCursor.java @@ -105,26 +105,12 @@ class JDBCCursor extends AbstractCursor { return 0; } - ResultSet rs = mResultSet; - if (rs == null) { - return 0; - } - - mHasNext = true; - int actual = 0; while (amount > 0) { - try { - if (rs.next()) { - actual++; - amount--; - } else { - mHasNext = false; - close(); - break; - } - } catch (SQLException e) { - throw mStorage.getJDBCRepository().toFetchException(e); + if (hasNext()) { + actual++; + amount--; + mHasNext = false; } } -- cgit v1.2.3