commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r883579 - /commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolingConnection.java
Date Tue, 24 Nov 2009 04:17:48 GMT
Author: psteitz
Date: Tue Nov 24 04:17:44 2009
New Revision: 883579

URL: http://svn.apache.org/viewvc?rev=883579&view=rev
Log:
Restored jdk 1.4-compatability.

Modified:
    commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolingConnection.java

Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolingConnection.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolingConnection.java?rev=883579&r1=883578&r2=883579&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolingConnection.java (original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolingConnection.java Tue
Nov 24 04:17:44 2009
@@ -274,16 +274,19 @@
         } else {
             PStmtKey key = (PStmtKey)obj;
             if( null == key._resultSetType && null == key._resultSetConcurrency )
{
-                return key._stmtType == STATEMENT_PREPAREDSTMT ?
-                    new PoolablePreparedStatement(getDelegate().prepareStatement( key._sql),
key, _pstmtPool, this) :
-                    new PoolableCallableStatement(getDelegate().prepareCall( key._sql ),
key, _pstmtPool, this);
-
+                if (key._stmtType == STATEMENT_PREPAREDSTMT ) {
+                    return new PoolablePreparedStatement(getDelegate().prepareStatement(
key._sql), key, _pstmtPool, this); 
+                } else {
+                    return new PoolableCallableStatement(getDelegate().prepareCall( key._sql),
key, _pstmtPool, this);
+                }
             }else {
-                return key._stmtType == STATEMENT_PREPAREDSTMT ?
-                    new PoolablePreparedStatement(getDelegate().prepareStatement(
-                        key._sql, key._resultSetType.intValue(),key._resultSetConcurrency.intValue()),
key, _pstmtPool, this) :
-                    new PoolableCallableStatement( getDelegate().prepareCall(
-                        key._sql,key._resultSetType.intValue(), key._resultSetConcurrency.intValue()
), key, _pstmtPool, this);
+                if(key._stmtType == STATEMENT_PREPAREDSTMT) {
+                    return new PoolablePreparedStatement(getDelegate().prepareStatement(
+                        key._sql, key._resultSetType.intValue(),key._resultSetConcurrency.intValue()),
key, _pstmtPool, this);
+                } else {
+                    return new PoolableCallableStatement( getDelegate().prepareCall(
+                        key._sql,key._resultSetType.intValue(), key._resultSetConcurrency.intValue()),
key, _pstmtPool, this);
+                }
             }
         }
     }



Mime
View raw message