garydgregory commented on a change in pull request #129:
URL: https://github.com/apache/commons-dbcp/pull/129#discussion_r736879772



##########
File path: 
src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
##########
@@ -205,7 +205,7 @@ public Connection getConnection(final String userName, 
final String userPassword
         try {
             info = getPooledConnectionAndInfo(userName, userPassword);
         } catch (final RuntimeException | SQLException e) {
-            closeDueToException(info);
+            closeDueToException(null);
             throw e;
         } catch (final Exception e) {
             closeDueToException(info);

Review comment:
       What about here?

##########
File path: 
src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
##########
@@ -239,7 +239,7 @@ public Connection getConnection(final String userName, 
final String userPassword
                 try {
                     info = getPooledConnectionAndInfo(userName, userPassword);
                 } catch (final RuntimeException | SQLException e) {
-                    closeDueToException(info);
+                    closeDueToException(null);
                     throw e;
                 } catch (final Exception e) {
                     closeDueToException(info);

Review comment:
       What about here?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to