commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1571760 - in /commons/proper/dbcp/trunk/src: main/java/org/apache/commons/dbcp2/ main/java/org/apache/commons/dbcp2/managed/ test/java/org/apache/commons/dbcp2/ test/java/org/apache/commons/dbcp2/datasources/
Date Tue, 25 Feb 2014 17:33:00 GMT
Author: ggregory
Date: Tue Feb 25 17:33:00 2014
New Revision: 1571760

URL: http://svn.apache.org/r1571760
Log:
Add final modifier to private fields.

Modified:
    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
    commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/managed/DataSourceXAConnectionFactory.java
    commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java
    commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TestDriverManagerConnectionFactory.java
    commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TesterClassLoader.java
    commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TesterPreparedStatement.java
    commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/datasources/PooledConnectionProxy.java

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=1571760&r1=1571759&r2=1571760&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
Tue Feb 25 17:33:00 2014
@@ -59,7 +59,7 @@ import java.sql.SQLXML;
 public class DelegatingResultSet extends AbandonedTrace implements ResultSet {
 
     /** My delegate. **/
-    private ResultSet _res;
+    private final ResultSet _res;
 
     /** The Statement that created me, if any. **/
     private Statement _stmt;

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=1571760&r1=1571759&r2=1571760&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
Tue Feb 25 17:33:00 2014
@@ -410,7 +410,7 @@ public class PoolableConnectionFactory
     private int maxOpenPreparedStatements =
         GenericKeyedObjectPoolConfig.DEFAULT_MAX_TOTAL_PER_KEY;
     private long maxConnLifetimeMillis = -1;
-    private AtomicLong connectionIndex = new AtomicLong(0);
+    private final AtomicLong connectionIndex = new AtomicLong(0);
     private Integer defaultQueryTimeout = null;
 
     /**

Modified: commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/managed/DataSourceXAConnectionFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/managed/DataSourceXAConnectionFactory.java?rev=1571760&r1=1571759&r2=1571760&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/managed/DataSourceXAConnectionFactory.java
(original)
+++ commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/managed/DataSourceXAConnectionFactory.java
Tue Feb 25 17:33:00 2014
@@ -35,8 +35,8 @@ import java.sql.SQLException;
  * @version $Revision$
  */
 public class DataSourceXAConnectionFactory implements XAConnectionFactory {
-	private TransactionRegistry transactionRegistry;
-	private XADataSource xaDataSource;
+	private final TransactionRegistry transactionRegistry;
+	private final XADataSource xaDataSource;
     private String username;
     private String 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=1571760&r1=1571759&r2=1571760&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
Tue Feb 25 17:33:00 2014
@@ -35,8 +35,8 @@ import java.sql.SQLException;
  * @version $Revision$
  */
 public class LocalXAConnectionFactory implements XAConnectionFactory {
-    private TransactionRegistry transactionRegistry;
-    private ConnectionFactory connectionFactory;
+    private final TransactionRegistry transactionRegistry;
+    private final ConnectionFactory connectionFactory;
 
     /**
      * Creates an LocalXAConnectionFactory which uses the specified connection factory to
create database

Modified: commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TestDriverManagerConnectionFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TestDriverManagerConnectionFactory.java?rev=1571760&r1=1571759&r2=1571760&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TestDriverManagerConnectionFactory.java
(original)
+++ commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TestDriverManagerConnectionFactory.java
Tue Feb 25 17:33:00 2014
@@ -87,7 +87,7 @@ public class TestDriverManagerConnection
     }
 
     private static final class ConnectionThread implements Runnable {
-        private DataSource ds;
+        private final DataSource ds;
         private volatile boolean result = true;
 
         private ConnectionThread(DataSource ds) {

Modified: commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TesterClassLoader.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TesterClassLoader.java?rev=1571760&r1=1571759&r2=1571760&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TesterClassLoader.java
(original)
+++ commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TesterClassLoader.java
Tue Feb 25 17:33:00 2014
@@ -24,7 +24,7 @@ import java.util.Set;
  */
 public class TesterClassLoader extends ClassLoader {
 
-    private Set<String> loadedClasses = new HashSet<>();
+    private final Set<String> loadedClasses = new HashSet<>();
 
     @Override
     protected synchronized Class<?> loadClass(String name, boolean resolve)

Modified: commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TesterPreparedStatement.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TesterPreparedStatement.java?rev=1571760&r1=1571759&r2=1571760&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TesterPreparedStatement.java
(original)
+++ commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TesterPreparedStatement.java
Tue Feb 25 17:33:00 2014
@@ -42,7 +42,7 @@ import java.sql.SQLXML;
  * @version $Revision$ $Date$
  */
 public class TesterPreparedStatement extends TesterStatement implements PreparedStatement
{
-    private ResultSetMetaData _resultSetMetaData = null;
+    private final ResultSetMetaData _resultSetMetaData = null;
     private String _sql = null;
     private String _catalog = null;
 

Modified: commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/datasources/PooledConnectionProxy.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/datasources/PooledConnectionProxy.java?rev=1571760&r1=1571759&r2=1571760&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/datasources/PooledConnectionProxy.java
(original)
+++ commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/datasources/PooledConnectionProxy.java
Tue Feb 25 17:33:00 2014
@@ -43,7 +43,7 @@ public class PooledConnectionProxy imple
     /**
      * ConnectionEventListeners
      */
-    private Vector<EventListener> eventListeners = new Vector<>();
+    private final Vector<EventListener> eventListeners = new Vector<>();
     
     /** 
      * True means we will (dubiously) notify listeners with a



Mime
View raw message