Author: sebb
Date: Tue Oct 12 23:15:22 2010
New Revision: 1021950

URL: http://svn.apache.org/viewvc?rev=1021950&view=rev
Log:
Remove deprecated ctors

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

Modified: 
commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/SoftReferenceObjectPool.java
URL: 
http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/SoftReferenceObjectPool.java?rev=1021950&r1=1021949&r2=1021950&view=diff
==============================================================================
--- 
commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/SoftReferenceObjectPool.java
 (original)
+++ 
commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/SoftReferenceObjectPool.java
 Tue Oct 12 23:15:22 2010
@@ -39,47 +39,19 @@ import org.apache.commons.pool.PoolUtils
  * @since Pool 1.0
  */
 public class SoftReferenceObjectPool<T> extends BaseObjectPool<T> implements 
ObjectPool<T> {
-    /**
-     * Create a <code>SoftReferenceObjectPool</code> without a factory.
-     * {...@link #setFactory(PoolableObjectFactory) setFactory} should be 
called
-     * before any attempts to use the pool are made.
-     * Generally speaking you should prefer the {...@link 
#SoftReferenceObjectPool(PoolableObjectFactory)} constructor.
-     *
-     * @see #SoftReferenceObjectPool(PoolableObjectFactory)
-     * @deprecated to be removed in pool 2.0.  Use {...@link 
#SoftReferenceObjectPool(PoolableObjectFactory)}.
-     */
-    public SoftReferenceObjectPool() {
-        _pool = new ArrayList<SoftReference<T>>();
-        _factory = null;
-    }
 
     /**
      * Create a <code>SoftReferenceObjectPool</code> with the specified 
factory.
      *
-     * @param factory object factory to use.
+     * @param factory object factory to use, not {...@code null}
+     * @throws IllegalArgumentException if the factory is null
      */
     public SoftReferenceObjectPool(PoolableObjectFactory<T> factory) {
-        _pool = new ArrayList<SoftReference<T>>();
-        _factory = factory;
-    }
-
-    /**
-     * Create a <code>SoftReferenceObjectPool</code> with the specified 
factory and initial idle object count.
-     *
-     * @param factory object factory to use.
-     * @param initSize initial size to attempt to prefill the pool.
-     * @throws Exception when there is a problem prefilling the pool.
-     * @throws IllegalArgumentException when <code>factory</code> is 
<code>null</code>.
-     * @deprecated because this is a SoftReference pool, prefilled idle 
obejects may be garbage collected before they are used.
-     *      To be removed in Pool 2.0.
-     */
-    public SoftReferenceObjectPool(PoolableObjectFactory<T> factory, int 
initSize) throws Exception, IllegalArgumentException {
         if (factory == null) {
-            throw new IllegalArgumentException("factory required to prefill 
the pool.");
+            throw new IllegalArgumentException("factory must not be null");
         }
-        _pool = new ArrayList<SoftReference<T>>(initSize);
+        _pool = new ArrayList<SoftReference<T>>();
         _factory = factory;
-        PoolUtils.prefill(this, initSize);
     }
 
     /**
@@ -347,5 +319,5 @@ public class SoftReferenceObjectPool<T> 
     private final ReferenceQueue<T> refQueue = new ReferenceQueue<T>();
 
     /** Number of active objects. */
-    private int _numActive = 0;
+    private int _numActive = 0; // 
 }


Reply via email to