Author: markt
Date: Wed Feb 26 12:29:04 2014
New Revision: 1572030

URL: http://svn.apache.org/r1572030
Log:
PMD fixes

Modified:
    
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
    
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/ConnectionFactory.java
    
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
    
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
    
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingPreparedStatement.java
    
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
    
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java

Modified: 
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
URL: 
http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java?rev=1572030&r1=1572029&r2=1572030&view=diff
==============================================================================
--- 
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
 (original)
+++ 
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
 Wed Feb 26 12:29:04 2014
@@ -2097,7 +2097,7 @@ public class BasicDataSource implements 
                 oldpool.close();
             }
         } catch(Exception e) {
-            // Do not propagate
+            /* Ignore */
         }
     }
 

Modified: 
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/ConnectionFactory.java
URL: 
http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/ConnectionFactory.java?rev=1572030&r1=1572029&r2=1572030&view=diff
==============================================================================
--- 
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/ConnectionFactory.java
 (original)
+++ 
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/ConnectionFactory.java
 Wed Feb 26 12:29:04 2014
@@ -5,17 +5,17 @@
  * 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.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.commons.dbcp2;
+
 import java.sql.Connection;
 import java.sql.SQLException;
 
@@ -33,5 +33,5 @@ public interface ConnectionFactory {
      * @return a new {@link java.sql.Connection}
      * @throws SQLException if a database error occurs creating the connection
      */
-    public abstract Connection createConnection() throws SQLException;
+    Connection createConnection() throws SQLException;
 }

Modified: 
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
URL: 
http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java?rev=1572030&r1=1572029&r2=1572030&view=diff
==============================================================================
--- 
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
 (original)
+++ 
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
 Wed Feb 26 12:29:04 2014
@@ -69,11 +69,6 @@ public class DelegatingCallableStatement
         super(c, s);
     }
 
-    /** Sets my delegate. */
-    public void setDelegate(CallableStatement s) {
-        super.setDelegate(s);
-    }
-
     @Override
     public void registerOutParameter(int parameterIndex, int sqlType) throws 
SQLException
     { checkOpen(); try { 
((CallableStatement)getDelegate()).registerOutParameter( parameterIndex,  
sqlType); } catch (SQLException e) { handleException(e); } }

Modified: 
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
URL: 
http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java?rev=1572030&r1=1572029&r2=1572030&view=diff
==============================================================================
--- 
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
 (original)
+++ 
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
 Wed Feb 26 12:29:04 2014
@@ -691,7 +691,7 @@ public class DelegatingConnection<C exte
 
 
     @Override
-    public void rollback(java.sql.Savepoint savepoint) throws SQLException {
+    public void rollback(Savepoint savepoint) throws SQLException {
         checkOpen();
         try {
             _conn.rollback(savepoint);
@@ -702,7 +702,7 @@ public class DelegatingConnection<C exte
 
 
     @Override
-    public void releaseSavepoint(java.sql.Savepoint savepoint)
+    public void releaseSavepoint(Savepoint savepoint)
             throws SQLException {
         checkOpen();
         try {

Modified: 
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingPreparedStatement.java
URL: 
http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingPreparedStatement.java?rev=1572030&r1=1572029&r2=1572030&view=diff
==============================================================================
--- 
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingPreparedStatement.java
 (original)
+++ 
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingPreparedStatement.java
 Wed Feb 26 12:29:04 2014
@@ -21,11 +21,14 @@ import java.math.BigDecimal;
 import java.sql.Array;
 import java.sql.Blob;
 import java.sql.Clob;
+import java.sql.Date;
 import java.sql.PreparedStatement;
 import java.sql.Ref;
 import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
 import java.sql.SQLException;
+import java.sql.Time;
+import java.sql.Timestamp;
 import java.util.Calendar;
 import java.io.InputStream;
 import java.io.Reader;
@@ -68,11 +71,6 @@ public class DelegatingPreparedStatement
         super(c, s);
     }
 
-    /** Sets my delegate. */
-    public void setDelegate(PreparedStatement s) {
-        super.setDelegate(s);
-    }
-
     @Override
     public ResultSet executeQuery() throws SQLException {
         checkOpen();
@@ -147,29 +145,29 @@ public class DelegatingPreparedStatement
     { checkOpen(); try { 
((PreparedStatement)getDelegate()).setBytes(parameterIndex,x); } catch 
(SQLException e) { handleException(e); } }
 
     @Override
-    public void setDate(int parameterIndex, java.sql.Date x) throws 
SQLException
+    public void setDate(int parameterIndex, Date x) throws SQLException
     { checkOpen(); try { 
((PreparedStatement)getDelegate()).setDate(parameterIndex,x); } catch 
(SQLException e) { handleException(e); } }
 
     @Override
-    public void setTime(int parameterIndex, java.sql.Time x) throws 
SQLException
+    public void setTime(int parameterIndex, Time x) throws SQLException
     { checkOpen(); try { 
((PreparedStatement)getDelegate()).setTime(parameterIndex,x); } catch 
(SQLException e) { handleException(e); } }
 
     @Override
-    public void setTimestamp(int parameterIndex, java.sql.Timestamp x) throws 
SQLException
+    public void setTimestamp(int parameterIndex, Timestamp x) throws 
SQLException
     { checkOpen(); try { 
((PreparedStatement)getDelegate()).setTimestamp(parameterIndex,x); } catch 
(SQLException e) { handleException(e); } }
 
     @Override
-    public void setAsciiStream(int parameterIndex, java.io.InputStream x, int 
length) throws SQLException
+    public void setAsciiStream(int parameterIndex, InputStream x, int length) 
throws SQLException
     { checkOpen(); try { 
((PreparedStatement)getDelegate()).setAsciiStream(parameterIndex,x,length); } 
catch (SQLException e) { handleException(e); } }
 
     /** @deprecated */
     @Deprecated
     @Override
-    public void setUnicodeStream(int parameterIndex, java.io.InputStream x, 
int length) throws SQLException
+    public void setUnicodeStream(int parameterIndex, InputStream x, int 
length) throws SQLException
     { checkOpen(); try { 
((PreparedStatement)getDelegate()).setUnicodeStream(parameterIndex,x,length); } 
catch (SQLException e) { handleException(e); } }
 
     @Override
-    public void setBinaryStream(int parameterIndex, java.io.InputStream x, int 
length) throws SQLException
+    public void setBinaryStream(int parameterIndex, InputStream x, int length) 
throws SQLException
     { checkOpen(); try { 
((PreparedStatement)getDelegate()).setBinaryStream(parameterIndex,x,length); } 
catch (SQLException e) { handleException(e); } }
 
     @Override
@@ -207,7 +205,7 @@ public class DelegatingPreparedStatement
     { checkOpen(); try { ((PreparedStatement)getDelegate()).addBatch(); } 
catch (SQLException e) { handleException(e); } }
 
     @Override
-    public void setCharacterStream(int parameterIndex, java.io.Reader reader, 
int length) throws SQLException
+    public void setCharacterStream(int parameterIndex, Reader reader, int 
length) throws SQLException
     { checkOpen(); try { 
((PreparedStatement)getDelegate()).setCharacterStream(parameterIndex,reader,length);
 } catch (SQLException e) { handleException(e); } }
 
     @Override
@@ -231,15 +229,15 @@ public class DelegatingPreparedStatement
     { checkOpen(); try { return 
((PreparedStatement)getDelegate()).getMetaData(); } catch (SQLException e) { 
handleException(e); throw new AssertionError(); } }
 
     @Override
-    public void setDate(int parameterIndex, java.sql.Date x, Calendar cal) 
throws SQLException
+    public void setDate(int parameterIndex, Date x, Calendar cal) throws 
SQLException
     { checkOpen(); try { 
((PreparedStatement)getDelegate()).setDate(parameterIndex,x,cal); } catch 
(SQLException e) { handleException(e); } }
 
     @Override
-    public void setTime(int parameterIndex, java.sql.Time x, Calendar cal) 
throws SQLException
+    public void setTime(int parameterIndex, Time x, Calendar cal) throws 
SQLException
     { checkOpen(); try { 
((PreparedStatement)getDelegate()).setTime(parameterIndex,x,cal); } catch 
(SQLException e) { handleException(e); } }
 
     @Override
-    public void setTimestamp(int parameterIndex, java.sql.Timestamp x, 
Calendar cal) throws SQLException
+    public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) 
throws SQLException
     { checkOpen(); try { 
((PreparedStatement)getDelegate()).setTimestamp(parameterIndex,x,cal); } catch 
(SQLException e) { handleException(e); } }
 
     @Override

Modified: 
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
URL: 
http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java?rev=1572030&r1=1572029&r2=1572030&view=diff
==============================================================================
--- 
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
 (original)
+++ 
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
 Wed Feb 26 12:29:04 2014
@@ -711,35 +711,35 @@ public final class DelegatingResultSet e
     { try { return _res.getURL(columnName); } catch (SQLException e) { 
handleException(e); return null; } }
 
     @Override
-    public void updateRef(int columnIndex, java.sql.Ref x) throws SQLException
+    public void updateRef(int columnIndex, Ref x) throws SQLException
     { try { _res.updateRef(columnIndex, x); } catch (SQLException e) { 
handleException(e); } }
 
     @Override
-    public void updateRef(String columnName, java.sql.Ref x) throws 
SQLException
+    public void updateRef(String columnName, Ref x) throws SQLException
     { try { _res.updateRef(columnName, x); } catch (SQLException e) { 
handleException(e); } }
 
     @Override
-    public void updateBlob(int columnIndex, java.sql.Blob x) throws 
SQLException
+    public void updateBlob(int columnIndex, Blob x) throws SQLException
     { try { _res.updateBlob(columnIndex, x); } catch (SQLException e) { 
handleException(e); } }
 
     @Override
-    public void updateBlob(String columnName, java.sql.Blob x) throws 
SQLException
+    public void updateBlob(String columnName, Blob x) throws SQLException
     { try { _res.updateBlob(columnName, x); } catch (SQLException e) { 
handleException(e); } }
 
     @Override
-    public void updateClob(int columnIndex, java.sql.Clob x) throws 
SQLException
+    public void updateClob(int columnIndex, Clob x) throws SQLException
     { try { _res.updateClob(columnIndex, x); } catch (SQLException e) { 
handleException(e); } }
 
     @Override
-    public void updateClob(String columnName, java.sql.Clob x) throws 
SQLException
+    public void updateClob(String columnName, Clob x) throws SQLException
     { try { _res.updateClob(columnName, x); } catch (SQLException e) { 
handleException(e); } }
 
     @Override
-    public void updateArray(int columnIndex, java.sql.Array x) throws 
SQLException
+    public void updateArray(int columnIndex, Array x) throws SQLException
     { try { _res.updateArray(columnIndex, x); } catch (SQLException e) { 
handleException(e); } }
 
     @Override
-    public void updateArray(String columnName, java.sql.Array x) throws 
SQLException
+    public void updateArray(String columnName, Array x) throws SQLException
     { try { _res.updateArray(columnName, x); } catch (SQLException e) { 
handleException(e); } }
 
 

Modified: 
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
URL: 
http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java?rev=1572030&r1=1572029&r2=1572030&view=diff
==============================================================================
--- 
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
 (original)
+++ 
commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
 Wed Feb 26 12:29:04 2014
@@ -348,17 +348,16 @@ public class PoolableConnectionFactory
                 conn.getAutoCommit() != _defaultAutoCommit.booleanValue()) {
             conn.setAutoCommit(_defaultAutoCommit.booleanValue());
         }
-        if ((_defaultTransactionIsolation != UNKNOWN_TRANSACTIONISOLATION)
-                && (conn.getTransactionIsolation() !=
-                _defaultTransactionIsolation)) {
+        if (_defaultTransactionIsolation != UNKNOWN_TRANSACTIONISOLATION &&
+                conn.getTransactionIsolation() != 
_defaultTransactionIsolation) {
             conn.setTransactionIsolation(_defaultTransactionIsolation);
         }
-        if ((_defaultReadOnly != null) &&
-                (conn.isReadOnly() != _defaultReadOnly.booleanValue())) {
+        if (_defaultReadOnly != null &&
+                conn.isReadOnly() != _defaultReadOnly.booleanValue()) {
             conn.setReadOnly(_defaultReadOnly.booleanValue());
         }
-        if ((_defaultCatalog != null) &&
-                (!_defaultCatalog.equals(conn.getCatalog()))) {
+        if (_defaultCatalog != null &&
+                !_defaultCatalog.equals(conn.getCatalog())) {
             conn.setCatalog(_defaultCatalog);
         }
         conn.setDefaultQueryTimeout(defaultQueryTimeout);


Reply via email to