commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r774668 - in /commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl: GenericKeyedObjectPool.java GenericObjectPool.java
Date Thu, 14 May 2009 07:34:57 GMT
Author: markt
Date: Thu May 14 07:34:57 2009
New Revision: 774668

URL: http://svn.apache.org/viewvc?rev=774668&view=rev
Log:
Correct patch for POOL-135. Only decrement _numActive when flag is set

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

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java?rev=774668&r1=774667&r2=774668&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
Thu May 14 07:34:57 2009
@@ -1298,7 +1298,9 @@
                         pool.queue.addLast(new ObjectTimestampPair(obj));
                     }
                     _totalIdle++;
-                    pool.decrementActiveCount();
+                    if (decrementNumActive) {
+                        pool.decrementActiveCount();
+                    }
                     notifyAll();
                 }
             }

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java?rev=774668&r1=774667&r2=774668&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java
Thu May 14 07:34:57 2009
@@ -1149,7 +1149,9 @@
                     } else {
                         _pool.addLast(new ObjectTimestampPair(obj));
                     }
-                    _numActive--;
+                    if (decrementNumActive) {
+                        _numActive--;
+                    }
                     notifyAll();
                 }
             }



Mime
View raw message