empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From franci...@apache.org
Subject svn commit: r747573 - /incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java
Date Tue, 24 Feb 2009 22:07:42 GMT
Author: francisdb
Date: Tue Feb 24 22:07:42 2009
New Revision: 747573

URL: http://svn.apache.org/viewvc?rev=747573&view=rev
Log:
fixed possible nullpointer
fixed preparedstatement not being closed

Modified:
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java

Modified: incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java?rev=747573&r1=747572&r2=747573&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java
(original)
+++ incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java
Tue Feb 24 22:07:42 2009
@@ -436,6 +436,7 @@
                 PreparedStatement pstmt = (genKeys!=null) 
                     ? conn.prepareStatement(sqlCmd, Statement.RETURN_GENERATED_KEYS)
                     : conn.prepareStatement(sqlCmd);
+    	        stmt = pstmt;
 	            prepareStatement(pstmt, sqlParams);
 	            count = pstmt.executeUpdate(); 
             }
@@ -460,7 +461,7 @@
             // done
             return count;
         } finally
-        { // Close
+        {
             close(stmt);
         }
     }



Mime
View raw message