You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/10/25 10:37:32 UTC
[tomcat] 15/15: Fix
https://bz.apache.org/bugzilla/show_bug.cgi?id=63833
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 8191a6aa8f3600cb48db064e23d89b7d9623ccc0
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Oct 25 12:36:44 2019 +0200
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63833
Avoid potential NPE. Patch by Guoxiong Li.
---
java/org/apache/tomcat/dbcp/dbcp/PoolableConnectionFactory.java | 4 +++-
webapps/docs/changelog.xml | 6 ++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/tomcat/dbcp/dbcp/PoolableConnectionFactory.java b/java/org/apache/tomcat/dbcp/dbcp/PoolableConnectionFactory.java
index b04fa6f..af71261 100644
--- a/java/org/apache/tomcat/dbcp/dbcp/PoolableConnectionFactory.java
+++ b/java/org/apache/tomcat/dbcp/dbcp/PoolableConnectionFactory.java
@@ -640,7 +640,9 @@ public class PoolableConnectionFactory implements PoolableObjectFactory<Poolable
@Override
public void destroyObject(PoolableConnection obj) throws Exception {
- obj.reallyClose();
+ if (obj != null) {
+ obj.reallyClose();
+ }
}
@Override
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 16c7cb4..a1cf0a4 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -115,6 +115,12 @@
Windows since compiled versions of those components are already
included within the zip distriubutions. (markt)
</fix>
+ <fix>
+ <bug>63833</bug>: Fix an error in the generification of the copied
+ Commons DBCP 1.x code that caused a <code>NullPointerException</code> if
+ a DataSource was configured with a database that did not exist. Patch
+ provided by Guoxiong Li. (markt)
+ </fix>
</changelog>
</subsection>
</section>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org