commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1563096 - /commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/main/java/org/apache/commons/dbcp/datasources/InstanceKeyObjectFactory.java
Date Fri, 31 Jan 2014 09:31:15 GMT
Author: markt
Date: Fri Jan 31 09:31:14 2014
New Revision: 1563096

URL: http://svn.apache.org/r1563096
Log:
Fix NPE caused by switch to ConcurrentHashMap identified by unit tests

Modified:
    commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/main/java/org/apache/commons/dbcp/datasources/InstanceKeyObjectFactory.java

Modified: commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/main/java/org/apache/commons/dbcp/datasources/InstanceKeyObjectFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/main/java/org/apache/commons/dbcp/datasources/InstanceKeyObjectFactory.java?rev=1563096&r1=1563095&r2=1563096&view=diff
==============================================================================
--- commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/main/java/org/apache/commons/dbcp/datasources/InstanceKeyObjectFactory.java
(original)
+++ commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/main/java/org/apache/commons/dbcp/datasources/InstanceKeyObjectFactory.java
Fri Jan 31 09:31:14 2014
@@ -64,9 +64,10 @@ abstract class InstanceKeyObjectFactory 
         return instanceKey;
     }
 
-    static void removeInstance(String key)
-    {
-        instanceMap.remove(key);
+    static void removeInstance(String key) {
+        if (key != null) {
+            instanceMap.remove(key);
+        }
     }
 
     /**



Mime
View raw message