commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r775774 - /commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java
Date Sun, 17 May 2009 22:49:51 GMT
Author: markt
Date: Sun May 17 22:49:50 2009
New Revision: 775774

URL: http://svn.apache.org/viewvc?rev=775774&view=rev
Log:
Correct bug in patch for POOL-75. If allocation fails, latch should be removed from allocation
queue.

Modified:
    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/GenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java?rev=775774&r1=775773&r2=775774&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
Sun May 17 22:49:50 2009
@@ -948,6 +948,9 @@
                             // allow new object to be created
                             break;
                         case WHEN_EXHAUSTED_FAIL:
+                            synchronized (this) {
+                                _allocationQueue.remove(latch);
+                            }
                             throw new NoSuchElementException("Pool exhausted");
                         case WHEN_EXHAUSTED_BLOCK:
                             try {



Mime
View raw message