commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1371159 - /commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/QueryRunner.java
Date Thu, 09 Aug 2012 10:57:58 GMT
Author: simonetripodi
Date: Thu Aug  9 10:57:58 2012
New Revision: 1371159

URL: http://svn.apache.org/viewvc?rev=1371159&view=rev
Log:
no tabs, replaced with 4 spaces
dropped trailing spaces

Modified:
    commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/QueryRunner.java

Modified: commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/QueryRunner.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/QueryRunner.java?rev=1371159&r1=1371158&r2=1371159&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/QueryRunner.java
(original)
+++ commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/QueryRunner.java
Thu Aug  9 10:57:58 2012
@@ -499,42 +499,42 @@ public class QueryRunner extends Abstrac
 
         return rows;
     }
-    
+
     public <T> T insert(String sql, ResultSetHandler<T> rsh) throws SQLException
{
         return insert(this.prepareConnection(), true, sql, rsh, (Object[]) null);
     }
-    
+
     public <T> T insert(String sql, ResultSetHandler<T> rsh, Object... params)
throws SQLException {
         return insert(this.prepareConnection(), true, sql, rsh, params);
     }
-    
+
     public <T> T insert(Connection conn, String sql, ResultSetHandler<T> rsh)
throws SQLException {
         return insert(conn, false, sql, rsh, (Object[]) null);
     }
-    
+
     public <T> T insert(Connection conn, String sql, ResultSetHandler<T> rsh,
Object... params) throws SQLException {
         return insert(conn, false, sql, rsh, params);
     }
 
     private <T> T insert(Connection conn, boolean closeConn, String sql, ResultSetHandler<T>
rsh, Object... params) throws SQLException {
-    	if (conn == null) {
-    	    throw new SQLException("Null connection");
-    	}
-    
-    	if (sql == null) {
-    	    if (closeConn) {
-    		close(conn);
-    	    }
-    	    throw new SQLException("Null SQL statement");
-    	}
-    
-    	if (rsh == null) {
-    	    if (closeConn) {
-    		close(conn);
-    	    }
-    	    throw new SQLException("Null ResultSetHandler");
-    	}
-    	
+        if (conn == null) {
+            throw new SQLException("Null connection");
+        }
+
+        if (sql == null) {
+            if (closeConn) {
+            close(conn);
+            }
+            throw new SQLException("Null SQL statement");
+        }
+
+        if (rsh == null) {
+            if (closeConn) {
+            close(conn);
+            }
+            throw new SQLException("Null ResultSetHandler");
+        }
+
         PreparedStatement stmt = null;
         T generatedKeys = null;
 
@@ -552,7 +552,7 @@ public class QueryRunner extends Abstrac
                 close(conn);
             }
         }
-        
+
         return generatedKeys;
     }
 }



Mime
View raw message