]> granicus.if.org Git - postgresql/commitdiff
Applied patch from Oliver Jowett to better handle invalid input for getArray
authorBarry Lind <barry@xythos.com>
Mon, 11 Aug 2003 21:33:50 +0000 (21:33 +0000)
committerBarry Lind <barry@xythos.com>
Mon, 11 Aug 2003 21:33:50 +0000 (21:33 +0000)
(no longer throw an index out of range exception)

 Modified Files:
  jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java

src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java

index 2f0ad3cb277bffdd1feb2f674c78911ec6ecfc6d..d06adb543fec1fa04d629dc1843f3db2d5df11a8 100644 (file)
@@ -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.20 2003/06/30 16:38:30 barry Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2ResultSet.java,v 1.21 2003/08/11 21:33:50 barry Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -253,6 +253,8 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
 
        public java.sql.Array getArray(int i) throws SQLException
        {
+               checkResultSet( i );
+
                wasNullFlag = (this_row[i - 1] == null);
                if (wasNullFlag)
                        return null;