You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by si...@apache.org on 2011/04/24 22:33:15 UTC

svn commit: r1096379 - /commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java

Author: simonetripodi
Date: Sun Apr 24 20:33:14 2011
New Revision: 1096379

URL: http://svn.apache.org/viewvc?rev=1096379&view=rev
Log:
added missing generics to setFactory() body method

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=1096379&r1=1096378&r2=1096379&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 Sun Apr 24 20:33:14 2011
@@ -1817,7 +1817,7 @@ public class GenericKeyedObjectPool<K,V>
      * @deprecated to be removed in version 2.0
      */
     public void setFactory(KeyedPoolableObjectFactory<K,V> factory) throws IllegalStateException {
-        Map toDestroy = new HashMap();
+        Map<K,List<ObjectTimestampPair<V>>> toDestroy = new HashMap<K, List<ObjectTimestampPair<V>>>();
         final KeyedPoolableObjectFactory<K,V> oldFactory = _factory;
         synchronized (this) {
             assertOpen();
@@ -1830,7 +1830,7 @@ public class GenericKeyedObjectPool<K,V>
                 if (pool != null) {
                     // Copy objects to new list so pool.queue can be cleared
                     // inside the sync
-                    List objects = new ArrayList();
+                    List<ObjectTimestampPair<V>> objects = new ArrayList<ObjectTimestampPair<V>>();
                     objects.addAll(pool.queue);
                     toDestroy.put(key, objects);
                     it.remove();