commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1227608 - in /commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils: AsyncQueryRunner.java QueryRunner.java
Date Thu, 05 Jan 2012 14:25:29 GMT
Author: simonetripodi
Date: Thu Jan  5 14:25:29 2012
New Revision: 1227608

URL: http://svn.apache.org/viewvc?rev=1227608&view=rev
Log:
added the generic type parameters to the calls instead of letting the compiler infer them,
that would work also on older JDK6 versions, see for example DISCOVERY-18

Modified:
    commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/AsyncQueryRunner.java
    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/AsyncQueryRunner.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/AsyncQueryRunner.java?rev=1227608&r1=1227607&r2=1227608&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/AsyncQueryRunner.java
(original)
+++ commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/AsyncQueryRunner.java
Thu Jan  5 14:25:29 2012
@@ -350,7 +350,7 @@ public class AsyncQueryRunner extends Ab
      * @throws SQLException if a database access error occurs
      */
     public <T> Future<T> query(Connection conn, String sql, ResultSetHandler<T>
rsh, Object... params) throws SQLException {
-        return executorService.submit(query(conn, false, sql, rsh, params));
+        return executorService.submit(this.<T>query(conn, false, sql, rsh, params));
     }
 
     /**
@@ -364,7 +364,7 @@ public class AsyncQueryRunner extends Ab
      * @throws SQLException if a database access error occurs
      */
     public <T> Future<T> query(Connection conn, String sql, ResultSetHandler<T>
rsh) throws SQLException {
-        return executorService.submit(this.query(conn, false, sql, rsh, (Object[]) null));
+        return executorService.submit(this.<T>query(conn, false, sql, rsh, (Object[])
null));
     }
 
     /**
@@ -382,7 +382,7 @@ public class AsyncQueryRunner extends Ab
      */
     public <T> Future<T> query(String sql, ResultSetHandler<T> rsh, Object...
params) throws SQLException {
         Connection conn = this.prepareConnection();
-        return executorService.submit(this.query(conn, true, sql, rsh, params));
+        return executorService.submit(this.<T>query(conn, true, sql, rsh, params));
     }
 
     /**
@@ -399,7 +399,7 @@ public class AsyncQueryRunner extends Ab
      */
     public <T> Future<T> query(String sql, ResultSetHandler<T> rsh) throws
SQLException {
         Connection conn = this.prepareConnection();
-        return executorService.submit(this.query(conn, true, sql, rsh, (Object[]) null));
+        return executorService.submit(this.<T>query(conn, true, sql, rsh, (Object[])
null));
     }
 
     /**

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=1227608&r1=1227607&r2=1227608&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 Jan  5 14:25:29 2012
@@ -176,7 +176,7 @@ public class QueryRunner extends Abstrac
      */
     @Deprecated
     public <T> T query(Connection conn, String sql, Object param, ResultSetHandler<T>
rsh) throws SQLException {
-        return this.query(conn, false, sql, rsh, new Object[]{param});
+        return this.<T>query(conn, false, sql, rsh, new Object[]{param});
     }
 
     /**
@@ -193,7 +193,7 @@ public class QueryRunner extends Abstrac
      */
     @Deprecated
     public <T> T query(Connection conn, String sql, Object[] params, ResultSetHandler<T>
rsh) throws SQLException {
-                return this.query(conn, false, sql, rsh, params);
+                return this.<T>query(conn, false, sql, rsh, params);
     }
 
     /**
@@ -208,7 +208,7 @@ public class QueryRunner extends Abstrac
      * @throws SQLException if a database access error occurs
      */
     public <T> T query(Connection conn, String sql, ResultSetHandler<T> rsh,
Object... params) throws SQLException {
-        return this.query(conn, false, sql, rsh, params);
+        return this.<T>query(conn, false, sql, rsh, params);
     }
 
     /**
@@ -222,7 +222,7 @@ public class QueryRunner extends Abstrac
      * @throws SQLException if a database access error occurs
      */
     public <T> T query(Connection conn, String sql, ResultSetHandler<T> rsh)
throws SQLException {
-        return this.query(conn, false, sql, rsh, (Object[]) null);
+        return this.<T>query(conn, false, sql, rsh, (Object[]) null);
     }
 
     /**
@@ -243,7 +243,7 @@ public class QueryRunner extends Abstrac
     public <T> T query(String sql, Object param, ResultSetHandler<T> rsh) throws
SQLException {
         Connection conn = this.prepareConnection();
 
-        return this.query(conn, true, sql, rsh, new Object[]{param});
+        return this.<T>query(conn, true, sql, rsh, new Object[]{param});
     }
 
     /**
@@ -266,7 +266,7 @@ public class QueryRunner extends Abstrac
     public <T> T query(String sql, Object[] params, ResultSetHandler<T> rsh)
throws SQLException {
         Connection conn = this.prepareConnection();
 
-        return query(conn, true, sql, rsh, params);
+        return this.<T>query(conn, true, sql, rsh, params);
     }
 
     /**
@@ -285,7 +285,7 @@ public class QueryRunner extends Abstrac
     public <T> T query(String sql, ResultSetHandler<T> rsh, Object... params)
throws SQLException {
         Connection conn = this.prepareConnection();
 
-        return this.query(conn, true, sql, rsh, params);
+        return this.<T>query(conn, true, sql, rsh, params);
     }
 
     /**
@@ -303,7 +303,7 @@ public class QueryRunner extends Abstrac
     public <T> T query(String sql, ResultSetHandler<T> rsh) throws SQLException
{
         Connection conn = this.prepareConnection();
 
-        return this.query(conn, true, sql, rsh, (Object[]) null);
+        return this.<T>query(conn, true, sql, rsh, (Object[]) null);
     }
 
     /**



Mime
View raw message