You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ma...@apache.org on 2009/11/23 16:42:49 UTC
svn commit: r883373 -
/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java
Author: markt
Date: Mon Nov 23 15:42:49 2009
New Revision: 883373
URL: http://svn.apache.org/viewvc?rev=883373&view=rev
Log:
Fix FindBugs warnings
Modified:
commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java
Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java?rev=883373&r1=883372&r2=883373&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java (original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java Mon Nov 23 15:42:49 2009
@@ -476,7 +476,7 @@
* Sets the {@link ConnectionFactory} from which to obtain base {@link Connection}s.
* @param connFactory the {@link ConnectionFactory} from which to obtain base {@link Connection}s
*/
- synchronized public void setConnectionFactory(ConnectionFactory connFactory) {
+ public void setConnectionFactory(ConnectionFactory connFactory) {
_connFactory = connFactory;
}
@@ -486,7 +486,7 @@
* Using <tt>null</tt> turns off validation.
* @param validationQuery a query to use to {@link #validateObject validate} {@link Connection}s.
*/
- synchronized public void setValidationQuery(String validationQuery) {
+ public void setValidationQuery(String validationQuery) {
_validationQuery = validationQuery;
}
@@ -499,7 +499,7 @@
* @param timeout new validation query timeout value in seconds
* @since 1.3
*/
- synchronized public void setValidationQueryTimeout(int timeout) {
+ public void setValidationQueryTimeout(int timeout) {
_validationQueryTimeout = timeout;
}
@@ -532,7 +532,7 @@
* Returns the {@link ObjectPool} in which {@link Connection}s are pooled.
* @return the connection pool
*/
- synchronized public ObjectPool getPool() {
+ public synchronized ObjectPool getPool() {
return _pool;
}
@@ -719,11 +719,11 @@
}
}
- protected ConnectionFactory _connFactory = null;
- protected String _validationQuery = null;
- protected int _validationQueryTimeout = -1;
+ protected volatile ConnectionFactory _connFactory = null;
+ protected volatile String _validationQuery = null;
+ protected volatile int _validationQueryTimeout = -1;
protected Collection _connectionInitSqls = null;
- protected ObjectPool _pool = null;
+ protected volatile ObjectPool _pool = null;
protected KeyedObjectPoolFactory _stmtPoolFactory = null;
protected Boolean _defaultReadOnly = null;
protected boolean _defaultAutoCommit = true;