commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1125835 - in /commons/proper/pool/trunk/src: changes/changes.xml java/org/apache/commons/pool2/PoolUtils.java
Date Sat, 21 May 2011 22:15:14 GMT
Author: markt
Date: Sat May 21 22:15:14 2011
New Revision: 1125835

URL: http://svn.apache.org/viewvc?rev=1125835&view=rev
Log:
Fix POOL-188.
Remove confusing method PoolUtils.ErodingKeyedObjectPool.numIdle(K key).
Patch by sebb 

Modified:
    commons/proper/pool/trunk/src/changes/changes.xml
    commons/proper/pool/trunk/src/java/org/apache/commons/pool2/PoolUtils.java

Modified: commons/proper/pool/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/changes/changes.xml?rev=1125835&r1=1125834&r2=1125835&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/changes/changes.xml (original)
+++ commons/proper/pool/trunk/src/changes/changes.xml Sat May 21 22:15:14 2011
@@ -48,6 +48,9 @@
       Remove WhenExhuastedAction.GROW since it is equivalent to
       WhenExhuastedAction.FAIL with a maxActive value of Integer.MAX_VALUE. 
     </action>
+    <action dev="markt" type="fix" issue="POOL-188" due-to="sebb">
+      Remove confusing method PoolUtils.ErodingKeyedObjectPool.numIdle(K key).
+    </action>
   </release>
   <release version="1.5.6" date="2011-04-03" description="This is a patch release, including
bugfixes only.">
     <action dev="markt" type="fix" issue="POOL-179" due-to="Axel Grossmann">

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool2/PoolUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool2/PoolUtils.java?rev=1125835&r1=1125834&r2=1125835&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool2/PoolUtils.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool2/PoolUtils.java Sat May 21
22:15:14 2011
@@ -1331,7 +1331,7 @@ public final class PoolUtils {
             final ErodingFactor factor = getErodingFactor(key);
             synchronized (keyedPool) {
                 if (factor.getNextShrink() < now) {
-                    final int numIdle = numIdle(key);
+                    final int numIdle = getNumIdle(key);
                     if (numIdle > 0) {
                         discard = true;
                     }
@@ -1351,13 +1351,6 @@ public final class PoolUtils {
         }
 
         /**
-         * {@inheritDoc}
-         */
-        protected int numIdle(final K key) {
-            return getKeyedPool().getNumIdle();
-        }
-
-        /**
          * Returns the eroding factor for the given key
          * @param key key
          * @return eroding factor for the given keyed pool
@@ -1493,14 +1486,6 @@ public final class PoolUtils {
          * {@inheritDoc}
          */
         @Override
-        protected int numIdle(final K key) {
-            return getKeyedPool().getNumIdle(key);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
         protected ErodingFactor getErodingFactor(final K key) {
             ErodingFactor factor = factors.get(key);
             // this may result in two ErodingFactors being created for a key



Mime
View raw message