commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject commons-dbcp git commit: No need to nest.
Date Fri, 27 Oct 2017 20:27:46 GMT
Repository: commons-dbcp
Updated Branches:
  refs/heads/master 9b4cb8ffb -> a9ab11f61


No need to nest.

Project: http://git-wip-us.apache.org/repos/asf/commons-dbcp/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-dbcp/commit/a9ab11f6
Tree: http://git-wip-us.apache.org/repos/asf/commons-dbcp/tree/a9ab11f6
Diff: http://git-wip-us.apache.org/repos/asf/commons-dbcp/diff/a9ab11f6

Branch: refs/heads/master
Commit: a9ab11f616f298ac1dc9f1e065369eee598d4416
Parents: 9b4cb8f
Author: Gary Gregory <ggregory@apache.org>
Authored: Fri Oct 27 14:27:44 2017 -0600
Committer: Gary Gregory <ggregory@apache.org>
Committed: Fri Oct 27 14:27:44 2017 -0600

----------------------------------------------------------------------
 src/main/java/org/apache/commons/dbcp2/PoolingConnection.java | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/a9ab11f6/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java b/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
index da63c25..aff6836 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
@@ -465,11 +465,10 @@ public class PoolingConnection extends DelegatingConnection<Connection>
             @SuppressWarnings({"rawtypes", "unchecked"}) // Unable to find way to avoid this
             PoolablePreparedStatement pps = new PoolablePreparedStatement(statement, key,
_pstmtPool, this);
             return new DefaultPooledObject<DelegatingPreparedStatement>(pps);
-        } else {
-            CallableStatement statement = (CallableStatement) key.createStatement(getDelegate());
-            PoolableCallableStatement pcs = new PoolableCallableStatement(statement, key,
_pstmtPool, this);
-            return new DefaultPooledObject<DelegatingPreparedStatement>(pcs);
         }
+        CallableStatement statement = (CallableStatement) key.createStatement(getDelegate());
+        PoolableCallableStatement pcs = new PoolableCallableStatement(statement, key, _pstmtPool,
this);
+        return new DefaultPooledObject<DelegatingPreparedStatement>(pcs);
     }
 
     /**


Mime
View raw message