commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1334070 - /commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
Date Fri, 04 May 2012 17:26:47 GMT
Author: sebb
Date: Fri May  4 17:26:46 2012
New Revision: 1334070

URL: http://svn.apache.org/viewvc?rev=1334070&view=rev
Log:
Wrong place to check for null; returning prevents any entries from being created

Modified:
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java?rev=1334070&r1=1334069&r2=1334070&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
Fri May  4 17:26:46 2012
@@ -1094,10 +1094,6 @@ public class GenericKeyedObjectPool<K,T>
     private void ensureMinIdle(K key) throws Exception {
         // Calculate current pool objects
         ObjectDeque<T> objectDeque = poolMap.get(key);
-        // Protect against NPEs in case the key has been removed
-        if (objectDeque == null) {
-            return;
-        }
 
         // this method isn't synchronized so the
         // calculateDeficit is done at the beginning



Mime
View raw message