commons-commits mailing list archives

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

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

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

Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/AsyncQueryRunner.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/AsyncQueryRunner.java?rev=1171800&r1=1171799&r2=1171800&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/AsyncQueryRunner.java
(original)
+++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/AsyncQueryRunner.java
Fri Sep 16 21:30:59 2011
@@ -105,8 +105,9 @@ public class AsyncQueryRunner extends Ab
                 rethrow(e, sql, (Object[])params);
             } finally {
                 close(ps);
-                if(closeConn)
+                if(closeConn) {
                     close(conn);
+                }
             }
 
             return ret;
@@ -164,14 +165,16 @@ public class AsyncQueryRunner extends Ab
         }
 
         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.");
         }
 
@@ -231,8 +234,9 @@ public class AsyncQueryRunner extends Ab
                     close(rs);
                 } finally {
                     close(ps);
-                    if(closeConn)
+                    if(closeConn) {
                         close(conn);
+                    }
                 }
             }
 
@@ -260,14 +264,16 @@ public class AsyncQueryRunner extends Ab
         }
 
         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");
         }
 
@@ -279,8 +285,9 @@ public class AsyncQueryRunner extends Ab
 
         } catch (SQLException e) {
             close(stmt);
-            if(closeConn)
+            if(closeConn) {
                 close(conn);
+            }
             this.rethrow(e, sql, params);
         }
 
@@ -378,8 +385,9 @@ public class AsyncQueryRunner extends Ab
                 rethrow(e, sql, params);
             } finally {
                 close(ps);
-                if(closeConn)
+                if(closeConn) {
                     close(conn);
+                }
             }
 
             return rows;
@@ -406,8 +414,9 @@ public class AsyncQueryRunner extends Ab
         }
 
         if(sql == null) {
-            if(closeConn)
+            if(closeConn) {
                 close(conn);
+            }
             throw new SQLException("Null SQL statement");
         }
 
@@ -419,8 +428,9 @@ public class AsyncQueryRunner extends Ab
 
         } catch (SQLException e) {
             close(stmt);
-            if(closeConn)
+            if(closeConn) {
                 close(conn);
+            }
             this.rethrow(e, sql, params);
         }
 



Mime
View raw message