commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1215567 - in /commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl: GenericKeyedObjectPool.java GenericObjectPool.java
Date Sat, 17 Dec 2011 20:22:05 GMT
Author: markt
Date: Sat Dec 17 20:22:04 2011
New Revision: 1215567

URL: http://svn.apache.org/viewvc?rev=1215567&view=rev
Log:
Fix POOL-202.
GKOP: Make clearing of eviction iterators thread-safe.
GOP: Align with GKOP.

Modified:
    commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.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=1215567&r1=1215566&r2=1215567&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
Sat Dec 17 20:22:04 2011
@@ -1104,8 +1104,6 @@ public class GenericKeyedObjectPool<K,T>
 
              closed = true;
              clear();
-             evictionIterator = null;
-             evictionKeyIterator = null;
              if (oname != null) {
                  ManagementFactory.getPlatformMBeanServer().unregisterMBean(
                          oname);
@@ -1682,6 +1680,8 @@ public class GenericKeyedObjectPool<K,T>
             if (null != evictor) {
                 EvictionTimer.cancel(evictor);
                 evictor = null;
+                evictionIterator = null;
+                evictionKeyIterator = null;
             }
             if (delay > 0) {
                 evictor = new Evictor();

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java?rev=1215567&r1=1215566&r2=1215567&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java
Sat Dec 17 20:22:04 2011
@@ -1231,6 +1231,7 @@ public class GenericObjectPool<T> extend
             if (null != evictor) {
                 EvictionTimer.cancel(evictor);
                 evictor = null;
+                evictionIterator = null;
             }
             if (delay > 0) {
                 evictor = new Evictor();



Mime
View raw message