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 2018/05/04 15:10:39 UTC

commons-dbcp git commit: [DBCP-490] The method org.apache.commons.dbcp2.PoolingDriver.getConnectionPool(String) does not tell you which pool name is not registered when it throws an exception.

Repository: commons-dbcp
Updated Branches:
  refs/heads/master a120a3934 -> 33172a83a


[DBCP-490] The method
org.apache.commons.dbcp2.PoolingDriver.getConnectionPool(String) does
not tell you which pool name is not registered when it throws an
exception.

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

Branch: refs/heads/master
Commit: 33172a83a4eadeb7084486256c57947567ddbf17
Parents: a120a39
Author: Gary Gregory <ga...@gmail.com>
Authored: Fri May 4 09:10:36 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Fri May 4 09:10:36 2018 -0600

----------------------------------------------------------------------
 src/changes/changes.xml                                   | 3 +++
 src/main/java/org/apache/commons/dbcp2/PoolingDriver.java | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/33172a83/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index a67d96f..10d51ab 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -76,6 +76,9 @@ The <action> type attribute can be add,update,fix,remove.
       <action dev="ggregory" type="update" issue="DBCP-488" due-to="Gary Gregory">
         NPE for org.apache.commons.dbcp2.cpdsadapter.DriverAdapterCPDS.setConnectionProperties(null).      
       </action>
+      <action dev="ggregory" type="update" issue="DBCP-490" due-to="Gary Gregory">
+        The method org.apache.commons.dbcp2.PoolingDriver.getConnectionPool(String) does not tell you which pool name is not registered when it throws an exception.      
+      </action>
     </release>
     <release version="2.2.0" date="2017-12-DD" description="This is a minor release, including bug fixes and enhancements.">
       <action dev="ggregory" type="fix" issue="DBCP-481" due-to="Gary Gregory">

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/33172a83/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java b/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
index c1f92d2..6bb7df2 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
@@ -81,7 +81,7 @@ public class PoolingDriver implements Driver {
             throws SQLException {
         final ObjectPool<? extends Connection> pool = pools.get(name);
         if (null == pool) {
-            throw new SQLException("Pool not registered.");
+            throw new SQLException("Pool not registered: " + name);
         }
         return pool;
     }