commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1171807 - /commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryRunner.java
Date Fri, 16 Sep 2011 21:35:21 GMT
Author: simonetripodi
Date: Fri Sep 16 21:35:21 2011
New Revision: 1171807

URL: http://svn.apache.org/viewvc?rev=1171807&view=rev
Log:
fixed checkstyle violation: 'if' construct must use '{}'s.

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

Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryRunner.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryRunner.java?rev=1171807&r1=1171806&r2=1171807&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryRunner.java (original)
+++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryRunner.java Fri
Sep 16 21:35:21 2011
@@ -125,14 +125,16 @@ public class QueryRunner extends Abstrac
         }
 
         if(sql == null) {
-            if(closeConn)
+            if(closeConn) {
                 close(conn);
+            }
             throw new SQLException("Null SQL statement");
         }
 
         if(params == null) {
-            if(closeConn)
+            if(closeConn) {
                 close(conn);
+            }
             throw new SQLException("Null parameters. If parameters aren't need, pass an empty
array.");
         }
 
@@ -151,8 +153,9 @@ public class QueryRunner extends Abstrac
             this.rethrow(e, sql, (Object[])params);
         } finally {
             close(stmt);
-            if(closeConn)
+            if(closeConn) {
                 close(conn);
+            }
         }
 
         return rows;
@@ -318,14 +321,16 @@ public class QueryRunner extends Abstrac
         }
 
         if(sql == null) {
-            if(closeConn)
+            if(closeConn) {
                 close(conn);
+            }
             throw new SQLException("Null SQL statement");
         }
 
         if(rsh == null) {
-            if(closeConn)
+            if(closeConn) {
                 close(conn);
+            }
             throw new SQLException("Null ResultSetHandler");
         }
 
@@ -464,8 +469,9 @@ public class QueryRunner extends Abstrac
         }
 
         if(sql == null) {
-            if(closeConn)
+            if(closeConn) {
                 close(conn);
+            }
             throw new SQLException("Null SQL statement");
         }
 



Mime
View raw message