commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r1174432 - /commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
Date Thu, 22 Sep 2011 22:35:21 GMT
Author: psteitz
Date: Thu Sep 22 22:35:21 2011
New Revision: 1174432

URL: http://svn.apache.org/viewvc?rev=1174432&view=rev
Log:
Added missing counter decrement.  Plugs capacity leak contributing to liveness problem.

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

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java?rev=1174432&r1=1174431&r2=1174432&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
Thu Sep 22 22:35:21 2011
@@ -1311,6 +1311,7 @@ public class GenericKeyedObjectPool<K,T>
         if (maxTotalPerKey > -1 && newCreateCount > maxTotalPerKey ||
                 newCreateCount > Integer.MAX_VALUE) {
             numTotal.decrementAndGet();
+            objectDeque.getCreateCount().decrementAndGet();
             return null;
         }
          



Mime
View raw message