commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1051655 - /commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
Date Tue, 21 Dec 2010 21:18:48 GMT
Author: simonetripodi
Date: Tue Dec 21 21:18:43 2010
New Revision: 1051655

URL: http://svn.apache.org/viewvc?rev=1051655&view=rev
Log:
fixed key type, it has to be the generic K rather than Object

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=1051655&r1=1051654&r2=1051655&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
Tue Dec 21 21:18:43 2010
@@ -1098,7 +1098,7 @@ public class GenericKeyedObjectPool<K,V>
      * @return the number of instances corresponding to the given <code>key</code>
currently borrowed in this pool
      */
     @Override
-    public synchronized int getNumActive(Object key) {
+    public synchronized int getNumActive(K key) {
         final ObjectQueue pool = (_poolMap.get(key));
         return pool != null ? pool.activeCount : 0;
     }
@@ -1110,7 +1110,7 @@ public class GenericKeyedObjectPool<K,V>
      * @return the number of instances corresponding to the given <code>key</code>
currently idle in this pool
      */
     @Override
-    public synchronized int getNumIdle(Object key) {
+    public synchronized int getNumIdle(K key) {
         final ObjectQueue pool = (_poolMap.get(key));
         return pool != null ? pool.queue.size() : 0;
     }



Mime
View raw message