diff options
author | Kris Jurka <books@ejurka.com> | 2005-04-22 14:36:48 +0000 |
---|---|---|
committer | Kris Jurka <books@ejurka.com> | 2005-04-22 14:36:48 +0000 |
commit | f5517ddbdafbb34e7aabd9fe041f1cbb24aad1f5 (patch) | |
tree | aa49f0b57446545657a12b6ead38d11dcf465f69 /src | |
parent | 08008de909688d59dc5988f49f2d2dcc4d5e8649 (diff) | |
download | postgresql-f5517ddbdafbb34e7aabd9fe041f1cbb24aad1f5.tar.gz postgresql-f5517ddbdafbb34e7aabd9fe041f1cbb24aad1f5.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java b/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java index 8363b1390f2..6e182b43bbc 100644 --- a/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java +++ b/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java @@ -9,7 +9,7 @@ * Copyright (c) 2003, PostgreSQL Global Development Group * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2ResultSet.java,v 1.25.2.10 2005/04/18 18:25:11 jurka Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2ResultSet.java,v 1.25.2.11 2005/04/22 14:36:48 jurka Exp $ * *------------------------------------------------------------------------- */ @@ -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 { |