From: Kris Jurka Date: Fri, 22 Apr 2005 14:36:48 +0000 (+0000) Subject: When moveToCurrentRow is called and the current row is off the X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=5ea1f1fb8ea3b28a96bbbd2c2e889bebd69bc97c;p=users%2Fbernd%2Fpostgres.git When moveToCurrentRow is called and the current row is off the end of the ResultSet we can't try to load that row because it doesn't exist and will throw an Exception. Reported by Prasanth. --- diff --git a/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java b/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java index 73726bc6ef..38dc25dc2b 100644 --- a/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java +++ b/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java @@ -699,7 +699,7 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra throw new PSQLException( "postgresql.updateable.notupdateable" ); } - if (current_row < 0) { + if (current_row < 0 || current_row >= rows.size()) { this_row = null; rowBuffer = null; } else {