You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/08/10 20:21:54 UTC
[commons-dbcp] branch master updated: Further refactoring based on
https://github.com/apache/commons-dbcp/pull/37
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-dbcp.git
The following commit(s) were added to refs/heads/master by this push:
new bfb738b Further refactoring based on https://github.com/apache/commons-dbcp/pull/37
bfb738b is described below
commit bfb738b0489fc1265e1bcc060fd0a5043775b564
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Aug 10 16:21:47 2020 -0400
Further refactoring based on
https://github.com/apache/commons-dbcp/pull/37
---
src/main/java/org/apache/commons/dbcp2/PoolingConnection.java | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java b/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
index 2661644..ac1d489 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
@@ -392,15 +392,7 @@ public class PoolingConnection extends DelegatingConnection<Connection>
* Wraps an underlying exception.
*/
private CallableStatement prepareCall(final PStmtKey key) throws SQLException {
- try {
- return (CallableStatement) pstmtPool.borrowObject(key);
- } catch (final NoSuchElementException e) {
- throw new SQLException("MaxOpenCallableStatements limit reached", e);
- } catch (final RuntimeException e) {
- throw e;
- } catch (final Exception e) {
- throw new SQLException("Borrow callableStatement from pool failed", e);
- }
+ return (CallableStatement) prepareStatement(key);
}
/**