commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1152279 - in /commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2: DelegatingCallableStatement.java DelegatingConnection.java DelegatingStatement.java
Date Fri, 29 Jul 2011 15:47:26 GMT
Author: markt
Date: Fri Jul 29 15:47:23 2011
New Revision: 1152279

URL: http://svn.apache.org/viewvc?rev=1152279&view=rev
Log:
Generics

Modified:
    commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
    commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingConnection.java
    commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingStatement.java

Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java?rev=1152279&r1=1152278&r2=1152279&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
(original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
Fri Jul 29 15:47:23 2011
@@ -168,7 +168,7 @@ public class DelegatingCallableStatement
     { checkOpen(); try { return ((CallableStatement)_stmt).getBigDecimal( parameterIndex);
} catch (SQLException e) { handleException(e); return null; } }
 
     @Override
-    public Object getObject(int i, Map map) throws SQLException
+    public Object getObject(int i, Map<String,Class<?>> map) throws SQLException
     { checkOpen(); try { return ((CallableStatement)_stmt).getObject( i, map); } catch (SQLException
e) { handleException(e); return null; } }
 
     @Override
@@ -376,7 +376,7 @@ public class DelegatingCallableStatement
     { checkOpen(); try { return ((CallableStatement)_stmt).getBigDecimal(parameterName);
} catch (SQLException e) { handleException(e); return null; } }
 
     @Override
-    public Object getObject(String parameterName, Map map) throws SQLException
+    public Object getObject(String parameterName, Map<String,Class<?>> map) throws
SQLException
     { checkOpen(); try { return ((CallableStatement)_stmt).getObject(parameterName, map);
} catch (SQLException e) { handleException(e); return null; } }
 
     @Override

Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingConnection.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingConnection.java?rev=1152279&r1=1152278&r2=1152279&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingConnection.java
(original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingConnection.java
Fri Jul 29 15:47:23 2011
@@ -518,9 +518,9 @@ public class DelegatingConnection extend
             // The JDBC spec requires that a Connection close any open
             // Statement's when it is closed.
             // DBCP-288. Not all the traced objects will be statements
-            List traces = getTrace();
+            List<AbandonedTrace> traces = getTrace();
             if(traces != null) {
-                Iterator traceIter = traces.iterator();
+                Iterator<AbandonedTrace> traceIter = traces.iterator();
                 while (traceIter.hasNext()) {
                     Object trace = traceIter.next();
                     if (trace instanceof Statement) {

Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingStatement.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingStatement.java?rev=1152279&r1=1152278&r2=1152279&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingStatement.java (original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingStatement.java Fri
Jul 29 15:47:23 2011
@@ -166,9 +166,9 @@ public class DelegatingStatement extends
                 // ResultSet's when it is closed.
                 // FIXME The PreparedStatement we're wrapping should handle this for us.
                 // See bug 17301 for what could happen when ResultSets are closed twice.
-                List resultSets = getTrace();
+                List<AbandonedTrace> resultSets = getTrace();
                 if( resultSets != null) {
-                    ResultSet[] set = (ResultSet[]) resultSets.toArray(new ResultSet[resultSets.size()]);
+                    ResultSet[] set = resultSets.toArray(new ResultSet[resultSets.size()]);
                     for (int i = 0; i < set.length; i++) {
                         set[i].close();
                     }



Mime
View raw message