commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1572045 - in /commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2: cpdsadapter/DriverAdapterCPDS.java datasources/PooledConnectionAndInfo.java datasources/SharedPoolDataSource.java managed/LocalXAConnectionFactory.java
Date Wed, 26 Feb 2014 13:21:14 GMT
Author: markt
Date: Wed Feb 26 13:21:13 2014
New Revision: 1572045

URL: http://svn.apache.org/r1572045
Log:
Fix some more PMD bugs

Modified:
    commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
    commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/PooledConnectionAndInfo.java
    commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSource.java
    commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java

Modified: commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java?rev=1572045&r1=1572044&r2=1572045&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
(original)
+++ commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
Wed Feb 26 13:21:13 2014
@@ -533,7 +533,7 @@ public class DriverAdapterCPDS
      * Set the log writer for this data source. NOT USED.
      */
     @Override
-    public void setLogWriter(java.io.PrintWriter out) {
+    public void setLogWriter(PrintWriter out) {
         logWriter = out;
     }
 

Modified: commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/PooledConnectionAndInfo.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/PooledConnectionAndInfo.java?rev=1572045&r1=1572044&r2=1572045&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/PooledConnectionAndInfo.java
(original)
+++ commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/PooledConnectionAndInfo.java
Wed Feb 26 13:21:13 2014
@@ -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.
@@ -20,9 +20,9 @@ package org.apache.commons.dbcp2.datasou
 import javax.sql.PooledConnection;
 
 /**
- * Immutable poolable object holding a PooledConnection along with the username and password

+ * Immutable poolable object holding a PooledConnection along with the username and password
  * used to create the connection.
- * 
+ *
  * @version $Revision$ $Date$
  */
 final class PooledConnectionAndInfo {
@@ -30,7 +30,7 @@ final class PooledConnectionAndInfo {
     private final String password;
     private final String username;
     private final UserPassKey upkey;
-    
+
     PooledConnectionAndInfo(PooledConnection pc, String username, String password) {
         this.pooledConnection = pc;
         this.username = username;
@@ -38,11 +38,11 @@ final class PooledConnectionAndInfo {
         upkey = new UserPassKey(username, password);
     }
 
-    final PooledConnection getPooledConnection() {
+    PooledConnection getPooledConnection() {
         return pooledConnection;
     }
 
-    final UserPassKey getUserPassKey() {
+    UserPassKey getUserPassKey() {
         return upkey;
     }
 
@@ -50,16 +50,15 @@ final class PooledConnectionAndInfo {
      * Get the value of password.
      * @return value of password.
      */
-    final String getPassword() {
+    String getPassword() {
         return password;
     }
-    
+
     /**
      * Get the value of username.
      * @return value of username.
      */
-    final String getUsername() {
+    String getUsername() {
         return username;
     }
-    
 }

Modified: commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSource.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSource.java?rev=1572045&r1=1572044&r2=1572045&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSource.java
(original)
+++ commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSource.java
Wed Feb 26 13:21:13 2014
@@ -163,9 +163,8 @@ public class SharedPoolDataSource extend
         return ref;
     }
 
-    private void registerPool(
-        String username, String password)
-        throws javax.naming.NamingException, SQLException {
+    private void registerPool(String username, String password)
+            throws NamingException, SQLException {
 
         ConnectionPoolDataSource cpds = testCPDS(username, password);
 

Modified: commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java?rev=1572045&r1=1572044&r2=1572045&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java
(original)
+++ commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java
Wed Feb 26 13:21:13 2014
@@ -289,8 +289,8 @@ public class LocalXAConnectionFactory im
          */
         @Override
         public synchronized void forget(Xid xid) {
-            if (xid != null && this.currentXid.equals(xid)) {
-                this.currentXid = null;
+            if (xid != null && xid.equals(currentXid)) {
+                currentXid = null;
             }
         }
 



Mime
View raw message