commons-commits mailing list archives

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

URL: http://svn.apache.org/r1571763
Log:
Remove unnecessary parentheses noise: 
return (this.foo); -> return this.foo;
and so on.

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/BasicDataSourceFactory.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/DriverManagerConnectionFactory.java
    commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
    commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
    commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/Utils.java
    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/cpdsadapter/PStmtKeyCPDS.java
    commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
    commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.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/datasources/UserPassKey.java
    commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TesterResultSet.java
    commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/datasources/TestPerUserPoolDataSource.java
    commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/datasources/TestSharedPoolDataSource.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=1571763&r1=1571762&r2=1571763&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
Tue Feb 25 17:39:56 2014
@@ -248,7 +248,7 @@ public class BasicDataSource
      * @param defaultCatalog the default catalog
      */
     public void setDefaultCatalog(String defaultCatalog) {
-        if ((defaultCatalog != null) && (defaultCatalog.trim().length() > 0))
{
+        if (defaultCatalog != null && defaultCatalog.trim().length() > 0) {
             this.defaultCatalog = defaultCatalog;
         }
         else {
@@ -344,7 +344,7 @@ public class BasicDataSource
      * @param driverClassName the class name of the jdbc driver
      */
     public synchronized void setDriverClassName(String driverClassName) {
-        if ((driverClassName != null) && (driverClassName.trim().length() > 0))
{
+        if (driverClassName != null && driverClassName.trim().length() > 0) {
             this.driverClassName = driverClassName;
         }
         else {
@@ -1137,7 +1137,7 @@ public class BasicDataSource
      * @param validationQuery the new value for the validation query
      */
     public void setValidationQuery(String validationQuery) {
-        if ((validationQuery != null) && (validationQuery.trim().length() > 0))
{
+        if (validationQuery != null && validationQuery.trim().length() > 0) {
             this.validationQuery = validationQuery;
         } else {
             this.validationQuery = null;
@@ -1231,7 +1231,7 @@ public class BasicDataSource
      * on connection creation
      */
     public void setConnectionInitSqls(Collection<String> connectionInitSqls) {
-        if ((connectionInitSqls != null) && (connectionInitSqls.size() > 0)) {
+        if (connectionInitSqls != null && connectionInitSqls.size() > 0) {
             ArrayList<String> newVal = null;
             for (String s : connectionInitSqls) {
             if (s != null && s.trim().length() > 0) {
@@ -1905,11 +1905,11 @@ public class BasicDataSource
         // This is double-checked locking. This is safe since dataSource is
         // volatile and the code is targeted at Java 5 onwards.
         if (dataSource != null) {
-            return (dataSource);
+            return dataSource;
         }
         synchronized (this) {
             if (dataSource != null) {
-                return (dataSource);
+                return dataSource;
             }
 
             jmxRegister();

Modified: commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java?rev=1571763&r1=1571762&r2=1571763&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java
(original)
+++ commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java
Tue Feb 25 17:39:56 2014
@@ -163,7 +163,7 @@ public class BasicDataSourceFactory impl
 
         // We only know how to deal with <code>javax.naming.Reference</code>s
         // that specify a class name of "javax.sql.DataSource"
-        if ((obj == null) || !(obj instanceof Reference)) {
+        if (obj == null || !(obj instanceof Reference)) {
             return null;
         }
         Reference ref = (Reference) obj;

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=1571763&r1=1571762&r2=1571763&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:39:56 2014
@@ -176,10 +176,10 @@ public class DelegatingResultSet extends
     }
 
     protected void handleException(SQLException e) throws SQLException {
-        if ((_stmt != null) && (_stmt instanceof DelegatingStatement)) {
+        if (_stmt != null && _stmt instanceof DelegatingStatement) {
             ((DelegatingStatement)_stmt).handleException(e);
         }
-        else if ((_conn != null) && (_conn instanceof DelegatingConnection)) {
+        else if (_conn != null && _conn instanceof DelegatingConnection) {
             ((DelegatingConnection<?>)_conn).handleException(e);
         }
         else {

Modified: commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java?rev=1571763&r1=1571762&r2=1571763&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java
(original)
+++ commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java
Tue Feb 25 17:39:56 2014
@@ -70,7 +70,7 @@ public class DriverManagerConnectionFact
     @Override
     public Connection createConnection() throws SQLException {
         if(null == _props) {
-            if((_uname == null) && (_passwd == null)) {
+            if(_uname == null && _passwd == null) {
                 return DriverManager.getConnection(_connectUri);
             } else {
                 return DriverManager.getConnection(_connectUri,_uname,_passwd);

Modified: commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/PStmtKey.java?rev=1571763&r1=1571762&r2=1571763&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/PStmtKey.java (original)
+++ commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/PStmtKey.java Tue Feb
25 17:39:56 2014
@@ -164,11 +164,11 @@ public class PStmtKey {
     public int hashCode() {
         final int prime = 31;
         int result = 1;
-        result = prime * result + ((_catalog == null) ? 0 : _catalog.hashCode());
-        result = prime * result + ((_resultSetConcurrency == null) ? 0 : _resultSetConcurrency.hashCode());
-        result = prime * result + ((_resultSetType == null) ? 0 : _resultSetType.hashCode());
-        result = prime * result + ((_sql == null) ? 0 : _sql.hashCode());
-        result = prime * result + ((_autoGeneratedKeys == null) ? 0 : _autoGeneratedKeys.hashCode());
+        result = prime * result + (_catalog == null ? 0 : _catalog.hashCode());
+        result = prime * result + (_resultSetConcurrency == null ? 0 : _resultSetConcurrency.hashCode());
+        result = prime * result + (_resultSetType == null ? 0 : _resultSetType.hashCode());
+        result = prime * result + (_sql == null ? 0 : _sql.hashCode());
+        result = prime * result + (_autoGeneratedKeys == null ? 0 : _autoGeneratedKeys.hashCode());
         result = prime * result + _stmtType.hashCode();
         return result;
     }

Modified: commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java?rev=1571763&r1=1571762&r2=1571763&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
(original)
+++ commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
Tue Feb 25 17:39:56 2014
@@ -169,7 +169,7 @@ public class PoolingConnection extends D
     @Override
     public CallableStatement prepareCall(String sql) throws SQLException {
         try {
-            return (CallableStatement) (_pstmtPool.borrowObject(createKey(sql, StatementType.CALLABLE_STATEMENT)));
+            return (CallableStatement) _pstmtPool.borrowObject(createKey(sql, StatementType.CALLABLE_STATEMENT));
         } catch (NoSuchElementException e) {
             throw new SQLException("MaxOpenCallableStatements limit reached", e);
         } catch (RuntimeException e) {
@@ -191,8 +191,8 @@ public class PoolingConnection extends D
     @Override
     public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency)
throws SQLException {
         try {
-            return (CallableStatement) (_pstmtPool.borrowObject(createKey(sql, resultSetType,
-                            resultSetConcurrency, StatementType.CALLABLE_STATEMENT)));
+            return (CallableStatement) _pstmtPool.borrowObject(createKey(sql, resultSetType,
+                            resultSetConcurrency, StatementType.CALLABLE_STATEMENT));
         } catch (NoSuchElementException e) {
             throw new SQLException("MaxOpenCallableStatements limit reached", e);
         } catch (RuntimeException e) {

Modified: commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/Utils.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/Utils.java?rev=1571763&r1=1571762&r2=1571763&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/Utils.java (original)
+++ commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/Utils.java Tue Feb 25
17:39:56 2014
@@ -33,7 +33,7 @@ public class Utils {
             Utils.class.getPackage().getName() + ".LocalStrings");
 
     public static final boolean IS_SECURITY_ENABLED =
-            (System.getSecurityManager() != null);
+            System.getSecurityManager() != null;
 
 
     private Utils() {

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=1571763&r1=1571762&r2=1571763&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
Tue Feb 25 17:39:56 2014
@@ -566,7 +566,7 @@ public class DriverAdapterCPDS
      * @return the value of maxIdle
      */
     public int getMaxIdle() {
-        return (this.maxIdle);
+        return this.maxIdle;
     }
 
     /**

Modified: commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java?rev=1571763&r1=1571762&r2=1571763&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java
(original)
+++ commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java
Tue Feb 25 17:39:56 2014
@@ -107,7 +107,7 @@ public class PStmtKeyCPDS extends PStmtK
         int result = super.hashCode();
         result = prime * result + Arrays.hashCode(_columnIndexes);
         result = prime * result + Arrays.hashCode(_columnNames);
-        result = prime * result + ((_resultSetHoldability == null) ? 0 : _resultSetHoldability.hashCode());
+        result = prime * result + (_resultSetHoldability == null ? 0 : _resultSetHoldability.hashCode());
         return result;
     }
 

Modified: commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java?rev=1571763&r1=1571762&r2=1571763&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
(original)
+++ commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
Tue Feb 25 17:39:56 2014
@@ -838,7 +838,7 @@ public abstract class InstanceKeyDataSou
      * @since 1.2.2
      */
     public boolean isRollbackAfterValidation() {
-        return (this.rollbackAfterValidation);
+        return this.rollbackAfterValidation;
     }
 
     /**

Modified: commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java?rev=1571763&r1=1571762&r2=1571763&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java
(original)
+++ commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java
Tue Feb 25 17:39:56 2014
@@ -856,7 +856,7 @@ public class PerUserPoolDataSource exten
     public int getNumActive(String username, String password) {
         ObjectPool<PooledConnectionAndInfo> pool =
             getPool(getPoolKey(username,password));
-        return (pool == null) ? 0 : pool.getNumActive();
+        return pool == null ? 0 : pool.getNumActive();
     }
 
     /**
@@ -872,7 +872,7 @@ public class PerUserPoolDataSource exten
     public int getNumIdle(String username, String password) {
         ObjectPool<PooledConnectionAndInfo> pool =
             getPool(getPoolKey(username,password));
-        return (pool == null) ? 0 : pool.getNumIdle();
+        return pool == null ? 0 : pool.getNumIdle();
     }
 
 

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=1571763&r1=1571762&r2=1571763&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
Tue Feb 25 17:39:56 2014
@@ -85,7 +85,7 @@ public class SharedPoolDataSource extend
      * Set {@link GenericKeyedObjectPool#getMaxTotal()} for this pool.
      */
     public int getMaxTotal() {
-        return (this.maxTotal);
+        return this.maxTotal;
     }
 
     /**
@@ -104,14 +104,14 @@ public class SharedPoolDataSource extend
      * Get the number of active connections in the pool.
      */
     public int getNumActive() {
-        return (pool == null) ? 0 : pool.getNumActive();
+        return pool == null ? 0 : pool.getNumActive();
     }
 
     /**
      * Get the number of idle connections in the pool.
      */
     public int getNumIdle() {
-        return (pool == null) ? 0 : pool.getNumIdle();
+        return pool == null ? 0 : pool.getNumIdle();
     }
 
     // ----------------------------------------------------------------------

Modified: commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/UserPassKey.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/UserPassKey.java?rev=1571763&r1=1571762&r2=1571763&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/UserPassKey.java
(original)
+++ commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/UserPassKey.java
Tue Feb 25 17:39:56 2014
@@ -89,8 +89,8 @@ class UserPassKey implements Serializabl
      */
     @Override
     public int hashCode() {
-        return (this.username != null ?
-                (this.username).hashCode() : 0);
+        return this.username != null ?
+                this.username.hashCode() : 0;
     }
 
     @Override

Modified: commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TesterResultSet.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TesterResultSet.java?rev=1571763&r1=1571762&r2=1571763&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TesterResultSet.java
(original)
+++ commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TesterResultSet.java
Tue Feb 25 17:39:56 2014
@@ -226,19 +226,19 @@ public class TesterResultSet implements 
     @Override
     public byte getByte(String columnName) throws SQLException {
         checkOpen();
-        return (byte)(columnName.hashCode());
+        return (byte)columnName.hashCode();
     }
 
     @Override
     public short getShort(String columnName) throws SQLException {
         checkOpen();
-        return (short)(columnName.hashCode());
+        return (short)columnName.hashCode();
     }
 
     @Override
     public int getInt(String columnName) throws SQLException {
         checkOpen();
-        return (columnName.hashCode());
+        return columnName.hashCode();
     }
 
     @Override

Modified: commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/datasources/TestPerUserPoolDataSource.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/datasources/TestPerUserPoolDataSource.java?rev=1571763&r1=1571762&r2=1571763&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/datasources/TestPerUserPoolDataSource.java
(original)
+++ commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/datasources/TestPerUserPoolDataSource.java
Tue Feb 25 17:39:56 2014
@@ -69,7 +69,7 @@ public class TestPerUserPoolDataSource e
         PerUserPoolDataSource tds = new PerUserPoolDataSource();
         tds.setConnectionPoolDataSource(pcds);
         tds.setDefaultMaxTotal(getMaxTotal());
-        tds.setDefaultMaxWaitMillis((int)(getMaxWaitMillis()));
+        tds.setDefaultMaxWaitMillis((int)getMaxWaitMillis());
         tds.setPerUserMaxTotal("foo", Integer.valueOf(getMaxTotal()));
         tds.setPerUserMaxWaitMillis("foo", Long.valueOf(getMaxWaitMillis()));
         tds.setDefaultTransactionIsolation(

Modified: commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/datasources/TestSharedPoolDataSource.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/datasources/TestSharedPoolDataSource.java?rev=1571763&r1=1571762&r2=1571763&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/datasources/TestSharedPoolDataSource.java
(original)
+++ commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/datasources/TestSharedPoolDataSource.java
Tue Feb 25 17:39:56 2014
@@ -69,7 +69,7 @@ public class TestSharedPoolDataSource ex
         SharedPoolDataSource tds = new SharedPoolDataSource();
         tds.setConnectionPoolDataSource(pcds);
         tds.setMaxTotal(getMaxTotal());
-        tds.setDefaultMaxWaitMillis((int)(getMaxWaitMillis()));
+        tds.setDefaultMaxWaitMillis((int)getMaxWaitMillis());
         tds.setDefaultTransactionIsolation(
             Connection.TRANSACTION_READ_COMMITTED);
         tds.setDefaultAutoCommit(Boolean.TRUE);
@@ -374,7 +374,7 @@ public class TestSharedPoolDataSource ex
                 " ms. maxWaitMillis: "+maxWaitMillis);
 
         // Threads should time out in parallel - allow double that to be safe
-        assertTrue((end-start) < (2 * maxWaitMillis));
+        assertTrue(end-start < 2 * maxWaitMillis);
 
         // Put all the connections back in the pool
         for (Connection element : c) {
@@ -492,7 +492,7 @@ public class TestSharedPoolDataSource ex
         SharedPoolDataSource tds = new SharedPoolDataSource();
         tds.setConnectionPoolDataSource(mypcds);
         tds.setMaxTotal(getMaxTotal());
-        tds.setDefaultMaxWaitMillis((int)(getMaxWaitMillis()));
+        tds.setDefaultMaxWaitMillis((int)getMaxWaitMillis());
         tds.setDefaultTransactionIsolation(
             Connection.TRANSACTION_READ_COMMITTED);
 



Mime
View raw message