garydgregory commented on code in PR #312:
URL: https://github.com/apache/commons-dbcp/pull/312#discussion_r1507877935


##########
src/main/java/org/apache/commons/dbcp2/cpdsadapter/PooledConnectionImpl.java:
##########
@@ -333,7 +334,10 @@ protected PStmtKey createKey(final String sql, final 
String[] columnNames) {
     @Override
     public void destroyObject(final PStmtKey key, final 
PooledObject<DelegatingPreparedStatement> pooledObject)
             throws SQLException {
-        pooledObject.getObject().getInnermostDelegate().close();
+        Statement s = pooledObject.getObject().getInnermostDelegate();
+        if (s != null) {

Review Comment:
   commit e627d55fe8a33b3ca482aac1da1b5555761c6146



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to