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/23 17:52:22 UTC

svn commit: r1096167 - /commons/proper/pool/trunk/src/java/org/apache/commons/pool/BaseObjectPool.java

Author: simonetripodi
Date: Sat Apr 23 15:52:22 2011
New Revision: 1096167

URL: http://svn.apache.org/viewvc?rev=1096167&view=rev
Log:
restored generics in BaseObjectPool implementation

Modified:
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/BaseObjectPool.java

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/BaseObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/BaseObjectPool.java?rev=1096167&r1=1096166&r2=1096167&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/BaseObjectPool.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/BaseObjectPool.java Sat Apr 23 15:52:22 2011
@@ -27,22 +27,22 @@ package org.apache.commons.pool;
  * @version $Revision$ $Date$
  * @since Pool 1.0
  */
-public abstract class BaseObjectPool implements ObjectPool {
+public abstract class BaseObjectPool<T> implements ObjectPool<T> {
     /**
      * Obtains an instance from the pool.
      * 
      * @return an instance from the pool
      * @throws Exception if an instance cannot be obtained from the pool
      */
-    public abstract Object borrowObject() throws Exception;
-    
+    public abstract T borrowObject() throws Exception;
+
     /**
      * Returns an instance to the pool.
      * 
      * @param obj instance to return to the pool
      */
-    public abstract void returnObject(Object obj) throws Exception;
-    
+    public abstract void returnObject(T obj) throws Exception;
+
     /**
      * <p>Invalidates an object from the pool.</p>
      * 
@@ -55,7 +55,7 @@ public abstract class BaseObjectPool imp
      * @param obj a {@link #borrowObject borrowed} instance to be disposed.
      * @throws Exception 
      */
-    public abstract void invalidateObject(Object obj) throws Exception;
+    public abstract void invalidateObject(T obj) throws Exception;
 
     /**
      * Not supported in this base implementation.
@@ -115,7 +115,7 @@ public abstract class BaseObjectPool imp
      * @throws IllegalStateException
      * @deprecated to be removed in pool 2.0
      */
-    public void setFactory(PoolableObjectFactory factory) throws IllegalStateException, UnsupportedOperationException {
+    public void setFactory(PoolableObjectFactory<T> factory) throws IllegalStateException, UnsupportedOperationException {
         throw new UnsupportedOperationException();
     }