commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1547638 - in /commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2: DelegatingCallableStatement.java DelegatingDatabaseMetaData.java DelegatingPreparedStatement.java DelegatingResultSet.java DelegatingStatement.java
Date Tue, 03 Dec 2013 23:15:18 GMT
Author: markt
Date: Tue Dec  3 23:15:17 2013
New Revision: 1547638

URL: http://svn.apache.org/r1547638
Log:
More work to address generics warnings in o.a.c.dbcp2 package

Modified:
    commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
    commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java
    commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingPreparedStatement.java
    commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingResultSet.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=1547638&r1=1547637&r2=1547638&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
Tue Dec  3 23:15:17 2013
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -66,7 +66,7 @@ public class DelegatingCallableStatement
      * @param c the {@link DelegatingConnection} that created this statement
      * @param s the {@link CallableStatement} to delegate all calls to
      */
-    public DelegatingCallableStatement(DelegatingConnection c,
+    public DelegatingCallableStatement(DelegatingConnection<?> c,
                                        CallableStatement s) {
         super(c, s);
     }

Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java?rev=1547638&r1=1547637&r2=1547638&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java
(original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java
Tue Dec  3 23:15:17 2013
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,7 +27,7 @@ import java.sql.SQLException;
 
 /**
  * <p>A base delegating implementation of {@link DatabaseMetaData}.</p>
- * 
+ *
  * <p>Methods that create {@link ResultSet} objects are wrapped to
  * create {@link DelegatingResultSet} objects and the remaining methods
  * simply call the corresponding method on the "delegate"
@@ -37,11 +37,11 @@ public class DelegatingDatabaseMetaData 
 
     /** My delegate {@link DatabaseMetaData} */
     protected DatabaseMetaData _meta; // TODO make final and private?
-    
+
     /** The connection that created me. **/
-    protected DelegatingConnection _conn = null; // TODO make final and private?
+    protected DelegatingConnection<?> _conn = null; // TODO make final and private?
 
-    public DelegatingDatabaseMetaData(DelegatingConnection c,
+    public DelegatingDatabaseMetaData(DelegatingConnection<?> c,
             DatabaseMetaData m) {
         super();
         _conn = c;
@@ -102,7 +102,7 @@ public class DelegatingDatabaseMetaData 
         }
         return m;
     }
-    
+
     protected void handleException(SQLException e) throws SQLException {
         if (_conn != null) {
             _conn.handleException(e);
@@ -1300,7 +1300,7 @@ public class DelegatingDatabaseMetaData 
             return _meta.unwrap(iface);
         }
     }
-    
+
     @Override
     public RowIdLifetime getRowIdLifetime() throws SQLException {
         { try { return _meta.getRowIdLifetime(); }

Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingPreparedStatement.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingPreparedStatement.java?rev=1547638&r1=1547637&r2=1547638&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingPreparedStatement.java
(original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingPreparedStatement.java
Tue Dec  3 23:15:17 2013
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -44,7 +44,7 @@ import java.sql.SQLXML;
  * provided in my constructor.
  * <p>
  * Extends AbandonedTrace to implement Statement tracking and
- * logging of code which created the Statement. Tracking the 
+ * logging of code which created the Statement. Tracking the
  * Statement ensures that the Connection which created it can
  * close any open Statement's on Connection close.
  *
@@ -65,7 +65,7 @@ public class DelegatingPreparedStatement
      * @param s the {@link PreparedStatement} to delegate all calls to.
      * @param c the {@link DelegatingConnection} that created this statement.
      */
-    public DelegatingPreparedStatement(DelegatingConnection c,
+    public DelegatingPreparedStatement(DelegatingConnection<?> c,
                                        PreparedStatement s) {
         super(c, s);
     }
@@ -186,7 +186,7 @@ public class DelegatingPreparedStatement
     @Override
     public void setUnicodeStream(int parameterIndex, java.io.InputStream x, int length) throws
SQLException
     { checkOpen(); try { ((PreparedStatement)_stmt).setUnicodeStream(parameterIndex,x,length);
} catch (SQLException e) { handleException(e); } }
-    
+
     @Override
     public void setBinaryStream(int parameterIndex, java.io.InputStream x, int length) throws
SQLException
     { checkOpen(); try { ((PreparedStatement)_stmt).setBinaryStream(parameterIndex,x,length);
} catch (SQLException e) { handleException(e); } }
@@ -268,7 +268,7 @@ public class DelegatingPreparedStatement
     /**
      * Returns a String representation of this object.
      *
-     * @return String 
+     * @return String
      * @since 1.2.2
      */
     @Override

Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingResultSet.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingResultSet.java?rev=1547638&r1=1547637&r2=1547638&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingResultSet.java (original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingResultSet.java Tue
Dec  3 23:15:17 2013
@@ -207,7 +207,7 @@ public class DelegatingResultSet extends
             ((DelegatingStatement)_stmt).handleException(e);
         }
         else if ((_conn != null) && (_conn instanceof DelegatingConnection)) {
-            ((DelegatingConnection)_conn).handleException(e);
+            ((DelegatingConnection<?>)_conn).handleException(e);
         }
         else {
             throw e;

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=1547638&r1=1547637&r2=1547638&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 Tue
Dec  3 23:15:17 2013
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -47,7 +47,7 @@ public class DelegatingStatement extends
     /** My delegate. */
     protected Statement _stmt = null;
     /** The connection that created me. **/
-    protected DelegatingConnection _conn = null;
+    protected DelegatingConnection<?> _conn = null;
 
     /**
      * Create a wrapper for the Statement which traces this
@@ -57,7 +57,7 @@ public class DelegatingStatement extends
      * @param s the {@link Statement} to delegate all calls to.
      * @param c the {@link DelegatingConnection} that created this statement.
      */
-    public DelegatingStatement(DelegatingConnection c, Statement s) {
+    public DelegatingStatement(DelegatingConnection<?> c, Statement s) {
         super(c);
         _stmt = s;
         _conn = c;
@@ -73,14 +73,14 @@ public class DelegatingStatement extends
     }
 
     /**
-     * <p>This method considers two objects to be equal 
+     * <p>This method considers two objects to be equal
      * if the underlying jdbc objects are equal.</p>
-     * 
-     * <p>If {@code obj} is a DelegatingStatement, this DelegatingStatement's 
+     *
+     * <p>If {@code obj} is a DelegatingStatement, this DelegatingStatement's
      * {@link #getInnermostDelegate() innermostDelegate} is compared with
      * the innermost delegate of obj; otherwise obj itself is compared with the
      * the Statement returned by {@link #getInnermostDelegate()}.</p>
-     * 
+     *
      */
     @Override
     public boolean equals(Object obj) {
@@ -106,7 +106,7 @@ public class DelegatingStatement extends
         }
         return obj.hashCode();
     }
-    
+
     /**
      * If my underlying {@link Statement} is not a
      * <tt>DelegatingStatement</tt>, returns it,
@@ -144,7 +144,7 @@ public class DelegatingStatement extends
     protected void checkOpen() throws SQLException {
         if(isClosed()) {
             throw new SQLException
-                (this.getClass().getName() + " with address: \"" + 
+                (this.getClass().getName() + " with address: \"" +
                 this.toString() + "\" is closed.");
         }
     }
@@ -161,7 +161,7 @@ public class DelegatingStatement extends
                     _conn.removeTrace(this);
                     _conn = null;
                 }
-        
+
                 // The JDBC spec requires that a statment close any open
                 // ResultSet's when it is closed.
                 // FIXME The PreparedStatement we're wrapping should handle this for us.
@@ -174,7 +174,7 @@ public class DelegatingStatement extends
                     }
                     clearTrace();
                 }
-        
+
                 if (_stmt != null) {
                 	_stmt.close();
                 }



Mime
View raw message