tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1833809 - in /tomcat/tc8.5.x/trunk/java/org/apache/tomcat/dbcp/dbcp2: PoolingConnection.java cpdsadapter/PooledConnectionImpl.java
Date Tue, 19 Jun 2018 10:37:57 GMT
Author: markt
Date: Tue Jun 19 10:37:57 2018
New Revision: 1833809

URL: http://svn.apache.org/viewvc?rev=1833809&view=rev
Log:
Java 7 isn't quite as good as Java 8 at inferring generic types.

Modified:
    tomcat/tc8.5.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolingConnection.java
    tomcat/tc8.5.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/PooledConnectionImpl.java

Modified: tomcat/tc8.5.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolingConnection.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolingConnection.java?rev=1833809&r1=1833808&r2=1833809&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolingConnection.java (original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolingConnection.java Tue Jun
19 10:37:57 2018
@@ -338,11 +338,11 @@ public class PoolingConnection extends D
             final PreparedStatement statement = (PreparedStatement) key.createStatement(getDelegate());
             @SuppressWarnings({"rawtypes", "unchecked" }) // Unable to find way to avoid
this
             final PoolablePreparedStatement pps = new PoolablePreparedStatement(statement,
key, pstmtPool, this);
-            return new DefaultPooledObject<>(pps);
+            return new DefaultPooledObject<DelegatingPreparedStatement>(pps);
         }
         final CallableStatement statement = (CallableStatement) key.createStatement(getDelegate());
         final PoolableCallableStatement pcs = new PoolableCallableStatement(statement, key,
pstmtPool, this);
-        return new DefaultPooledObject<>(pcs);
+        return new DefaultPooledObject<DelegatingPreparedStatement>(pcs);
     }
 
     /**

Modified: tomcat/tc8.5.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/PooledConnectionImpl.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/PooledConnectionImpl.java?rev=1833809&r1=1833808&r2=1833809&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/PooledConnectionImpl.java
(original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/PooledConnectionImpl.java
Tue Jun 19 10:37:57 2018
@@ -339,13 +339,13 @@ class PooledConnectionImpl
             @SuppressWarnings({"rawtypes", "unchecked" }) // Unable to find way to avoid
this
             final PoolablePreparedStatement pps = new PoolablePreparedStatement(statement,
key, pStmtPool,
                     delegatingConnection);
-            return new DefaultPooledObject<>(pps);
+            return new DefaultPooledObject<DelegatingPreparedStatement>(pps);
         }
         final CallableStatement statement = (CallableStatement) key.createStatement(connection);
         @SuppressWarnings("unchecked")
         final PoolableCallableStatement pcs = new PoolableCallableStatement(statement, key,
pStmtPool,
                 (DelegatingConnection<Connection>) delegatingConnection);
-        return new DefaultPooledObject<>(pcs);
+        return new DefaultPooledObject<DelegatingPreparedStatement>(pcs);
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message