You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by rh...@apache.org on 2013/02/15 14:06:28 UTC

svn commit: r1446562 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet42.java

Author: rhillegas
Date: Fri Feb 15 13:06:27 2013
New Revision: 1446562

URL: http://svn.apache.org/r1446562
Log:
DERBY-6000: Fix NPE in embedded implemention of new ResultSet.updateObject() overloads added by JDBC 4.2.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet42.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet42.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet42.java?rev=1446562&r1=1446561&r2=1446562&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet42.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet42.java Fri Feb 15 13:06:27 2013
@@ -50,6 +50,7 @@ public class EmbedResultSet42 extends or
         ( int columnIndex, Object x, SQLType targetSqlType )
         throws SQLException
     {
+        checkIfClosed("updateObject");
         updateObject( columnIndex, x, Util42.getTypeAsInt( this, targetSqlType ) );
     }
 
@@ -57,6 +58,7 @@ public class EmbedResultSet42 extends or
         ( int columnIndex, Object x, SQLType targetSqlType, int scaleOrLength )
         throws SQLException
     {
+        checkIfClosed("updateObject");
         updateObject( columnIndex, x, Util42.getTypeAsInt( this, targetSqlType ) );
         adjustScale( columnIndex, scaleOrLength );
     }
@@ -65,6 +67,7 @@ public class EmbedResultSet42 extends or
         ( String columnName, Object x, SQLType targetSqlType )
         throws SQLException
     {
+        checkIfClosed("updateObject");
         updateObject( columnName, x, Util42.getTypeAsInt( this, targetSqlType ) );
     }
 
@@ -72,6 +75,7 @@ public class EmbedResultSet42 extends or
         ( String columnName, Object x, SQLType targetSqlType, int scaleOrLength )
         throws SQLException
     {
+        checkIfClosed("updateObject");
         updateObject( findColumnName( columnName ), x, targetSqlType, scaleOrLength );
     }