commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r777748 - in /commons/proper/pool/trunk/src/java/org/apache/commons/pool: ./ impl/
Date Sat, 23 May 2009 00:00:45 GMT
Author: sebb
Date: Sat May 23 00:00:44 2009
New Revision: 777748

URL: http://svn.apache.org/viewvc?rev=777748&view=rev
Log:
Tab police; also remove trailing white-space

Modified:
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/BaseKeyedObjectPool.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/BaseKeyedPoolableObjectFactory.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/BaseObjectPool.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/BasePoolableObjectFactory.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/KeyedObjectPool.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/KeyedObjectPoolFactory.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/KeyedPoolableObjectFactory.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/ObjectPool.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/ObjectPoolFactory.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/PoolUtils.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/PoolableObjectFactory.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/CursorableLinkedList.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/EvictionTimer.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPoolFactory.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPoolFactory.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/SoftReferenceObjectPool.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPoolFactory.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackObjectPool.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackObjectPoolFactory.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/overview.html
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/package.html

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/BaseKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/BaseKeyedObjectPool.java?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/BaseKeyedObjectPool.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/BaseKeyedObjectPool.java Sat May 23 00:00:44 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/BaseKeyedPoolableObjectFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/BaseKeyedPoolableObjectFactory.java?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/BaseKeyedPoolableObjectFactory.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/BaseKeyedPoolableObjectFactory.java Sat May 23 00:00:44 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -51,7 +51,7 @@
     }
 
     /** No-op. */
-    public void passivateObject(Object key, Object obj) 
+    public void passivateObject(Object key, Object obj)
         throws Exception {
     }
 }

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=777748&r1=777747&r2=777748&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 May 23 00:00:44 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -99,6 +99,6 @@
             throw new IllegalStateException("Pool not open");
         }
     }
-    
+
     private volatile boolean closed = false;
 }

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/BasePoolableObjectFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/BasePoolableObjectFactory.java?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/BasePoolableObjectFactory.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/BasePoolableObjectFactory.java Sat May 23 00:00:44 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -52,7 +52,7 @@
     }
 
     /** No-op. */
-    public void passivateObject(Object obj) 
+    public void passivateObject(Object obj)
         throws Exception {
     }
 }

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/KeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/KeyedObjectPool.java?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/KeyedObjectPool.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/KeyedObjectPool.java Sat May 23 00:00:44 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -97,7 +97,7 @@
      * By contract, <code>obj</code> <strong>must</strong> have been obtained
      * using {@link #borrowObject borrowObject}
      * or a related method as defined in an implementation
-     * or sub-interface 
+     * or sub-interface
      * using a <code>key</code> that is equivalent to the one used to
      * borrow the instance in the first place.
      *
@@ -114,7 +114,7 @@
      * By contract, <code>obj</code> <strong>must</strong> have been obtained
      * using {@link #borrowObject borrowObject}
      * or a related method as defined in an implementation
-     * or sub-interface 
+     * or sub-interface
      * using a <code>key</code> that is equivalent to the one used to
      * borrow the <code>Object</code> in the first place.
      * <p>

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/KeyedObjectPoolFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/KeyedObjectPoolFactory.java?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/KeyedObjectPoolFactory.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/KeyedObjectPoolFactory.java Sat May 23 00:00:44 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/KeyedPoolableObjectFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/KeyedPoolableObjectFactory.java?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/KeyedPoolableObjectFactory.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/KeyedPoolableObjectFactory.java Sat May 23 00:00:44 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -65,7 +65,7 @@
  * </p>
  *
  * @see KeyedObjectPool
- * 
+ *
  * @author Rodney Waldhoff
  * @author Sandy McArthur
  * @version $Revision$ $Date$

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/ObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/ObjectPool.java?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/ObjectPool.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/ObjectPool.java Sat May 23 00:00:44 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,7 +22,7 @@
 /**
  * A pooling interface.
  * <p>
- * <code>ObjectPool</code> defines a trivially simple pooling interface. The only 
+ * <code>ObjectPool</code> defines a trivially simple pooling interface. The only
  * required methods are {@link #borrowObject borrowObject}, {@link #returnObject returnObject}
  * and {@link #invalidateObject invalidateObject}.
  * </p>

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/ObjectPoolFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/ObjectPoolFactory.java?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/ObjectPoolFactory.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/ObjectPoolFactory.java Sat May 23 00:00:44 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,7 +19,7 @@
 
 /**
  * A factory interface for creating {@link ObjectPool}s.
- * 
+ *
  * @see ObjectPool
  *
  * @author Rodney Waldhoff

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/PoolUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/PoolUtils.java?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/PoolUtils.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/PoolUtils.java Sat May 23 00:00:44 2009
@@ -1386,7 +1386,7 @@
                     '}';
         }
     }
-    
+
     private static class ErodingObjectPool implements ObjectPool {
         private final ObjectPool pool;
         private final ErodingFactor factor;
@@ -1478,7 +1478,7 @@
 
         protected ErodingKeyedObjectPool(final KeyedObjectPool keyedPool, final ErodingFactor erodingFactor) {
             if (keyedPool == null) {
-                throw new IllegalArgumentException("keyedPool must not be null.");                
+                throw new IllegalArgumentException("keyedPool must not be null.");
             }
             this.keyedPool = keyedPool;
             this.erodingFactor = erodingFactor;

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/PoolableObjectFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/PoolableObjectFactory.java?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/PoolableObjectFactory.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/PoolableObjectFactory.java Sat May 23 00:00:44 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/CursorableLinkedList.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/CursorableLinkedList.java?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/CursorableLinkedList.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/CursorableLinkedList.java Sat May 23 00:00:44 2009
@@ -37,10 +37,10 @@
  * to prevent its inclusion in the pool public API. The class declaration below
  * should *not* be changed to public.
  * </p>
- * 
+ *
  * A doubly-linked list implementation of the {@link List} interface,
  * supporting a {@link ListIterator} that allows concurrent modifications
- * to the underlying list. 
+ * to the underlying list.
  * <p>
  *
  * Implements all of the optional {@link List} operations, the
@@ -51,15 +51,15 @@
  * <b>Note that this implementation is not synchronized.</b>
  *
  * @see java.util.LinkedList
- * 
+ *
  * @version $Revision: 480452 $ $Date: 2006-11-29 00:45:14 -0700 (Wed, 29 Nov 2006) $
- * 
+ *
  * @author Rodney Waldhoff
  * @author Janek Bogucki
  * @author Simon Kitching
  */
 class CursorableLinkedList implements List, Serializable {
-    /** Ensure serialization compatibility */    
+    /** Ensure serialization compatibility */
     private static final long serialVersionUID = 8836393098519411393L;
 
     //--- public methods ---------------------------------------------
@@ -84,11 +84,11 @@
      * @param element element to be inserted.
      *
      * @throws ClassCastException if the class of the specified element
-     * 		  prevents it from being added to this list.
+     *         prevents it from being added to this list.
      * @throws IllegalArgumentException if some aspect of the specified
-     *		     element prevents it from being added to this list.
+     *         element prevents it from being added to this list.
      * @throws IndexOutOfBoundsException if the index is out of range
-     *		     (index &lt; 0 || index &gt; size()).
+     *         (index &lt; 0 || index &gt; size()).
      */
     public void add(int index, Object element) {
         if(index == _size) {
@@ -115,7 +115,7 @@
      * @return <tt>true</tt> if this list changed as a result of the call.
      *
      * @throws ClassCastException if the class of an element in the specified
-     * 	     collection prevents it from being added to this list.
+     *       collection prevents it from being added to this list.
      * @throws IllegalArgumentException if some aspect of an element in the
      *         specified collection prevents it from being added to this
      *         list.
@@ -143,18 +143,18 @@
      * collection is this list, and it's nonempty.)
      *
      * @param index index at which to insert first element from the specified
-     *	            collection.
+     *              collection.
      * @param c elements to be inserted into this list.
      * @return <tt>true</tt> if this list changed as a result of the call.
      *
      * @throws ClassCastException if the class of one of elements of the
-     * 		   specified collection prevents it from being added to this
-     * 		   list.
+     *         specified collection prevents it from being added to this
+     *         list.
      * @throws IllegalArgumentException if some aspect of one of elements of
      *         the specified collection prevents it from being added to
      *         this list.
      * @throws IndexOutOfBoundsException if the index is out of range (index
-     *	      &lt; 0 || index &gt; size()).
+     *         &lt; 0 || index &gt; size()).
      */
     public boolean addAll(int index, Collection c) {
         if(c.isEmpty()) {
@@ -228,7 +228,7 @@
      */
     public boolean contains(Object o) {
         for(Listable elt = _head.next(), past = null; null != elt && past != _head.prev(); elt = (past = elt).next()) {
-            if((null == o && null == elt.value()) || 
+            if((null == o && null == elt.value()) ||
                (o != null && o.equals(elt.value()))) {
                 return true;
             }
@@ -271,8 +271,8 @@
      * {@link ListIterator#nextIndex} and {@link ListIterator#previousIndex}
      * methods (they throw {@link UnsupportedOperationException} when invoked.
      * <p>
-     * Historical Note: In previous versions of this class, the object 
-     * returned from this method was required to be explicitly closed. This 
+     * Historical Note: In previous versions of this class, the object
+     * returned from this method was required to be explicitly closed. This
      * is no longer necessary.
      *
      * @see #cursor(int)
@@ -297,7 +297,7 @@
      * @see #listIterator(int)
      * @see CursorableLinkedList.Cursor
      * @throws IndexOutOfBoundsException if the index is out of range (index
-     *	        &lt; 0 || index &gt; size()).
+     *          &lt; 0 || index &gt; size()).
      */
     public CursorableLinkedList.Cursor cursor(int i) {
         return new Cursor(i);
@@ -339,7 +339,7 @@
      * @return the element at the specified position in this list.
      *
      * @throws IndexOutOfBoundsException if the index is out of range (index
-     * 		  &lt; 0 || index &gt;= size()).
+     *         &lt; 0 || index &gt;= size()).
      */
     public Object get(int index) {
         return getListableAt(index).value();
@@ -456,7 +456,7 @@
      *
      * @param o element to search for.
      * @return the index in this list of the last occurrence of the specified
-     * 	       element, or -1 if this list does not contain this element.
+     *         element, or -1 if this list does not contain this element.
      */
     public int lastIndexOf(Object o) {
         int ndx = _size-1;
@@ -623,11 +623,11 @@
      * @return the element previously at the specified position.
      *
      * @throws ClassCastException if the class of the specified element
-     * 		  prevents it from being added to this list.
+     *         prevents it from being added to this list.
      * @throws IllegalArgumentException if some aspect of the specified
-     *	        element prevents it from being added to this list.
+     *         element prevents it from being added to this list.
      * @throws IndexOutOfBoundsException if the index is out of range
-     *		     (index &lt; 0 || index &gt;= size()).
+     *         (index &lt; 0 || index &gt;= size()).
      */
     public Object set(int index, Object element) {
         Listable elt = getListableAt(index);
@@ -727,7 +727,7 @@
      * list, after the specified <i>before</i> element, and before the
      * specified <i>after</i> element
      *
-     * @return the newly created 
+     * @return the newly created
      * {@link org.apache.commons.collections.CursorableLinkedList.Listable}
      */
     protected Listable insertListable(Listable before, Listable after, Object value) {
@@ -750,8 +750,8 @@
     }
 
     /**
-     * Removes the given 
-     * {@link org.apache.commons.collections.CursorableLinkedList.Listable} 
+     * Removes the given
+     * {@link org.apache.commons.collections.CursorableLinkedList.Listable}
      * from my list.
      */
     protected void removeListable(Listable elt) {
@@ -773,8 +773,8 @@
     }
 
     /**
-     * Returns the 
-     * {@link org.apache.commons.collections.CursorableLinkedList.Listable} 
+     * Returns the
+     * {@link org.apache.commons.collections.CursorableLinkedList.Listable}
      * at the specified index.
      *
      * @throws IndexOutOfBoundsException if index is less than zero or
@@ -812,7 +812,7 @@
                 it.remove();
             }
         }
-        
+
         _cursors.add( new WeakReference(cur) );
     }
 
@@ -825,11 +825,11 @@
             WeakReference ref = (WeakReference) it.next();
             Cursor cursor = (Cursor) ref.get();
             if (cursor == null) {
-                // some other unrelated cursor object has been 
+                // some other unrelated cursor object has been
                 // garbage-collected; let's take the opportunity to
                 // clean up the cursors list anyway..
                 it.remove();
-                
+
             } else if (cursor == cur) {
                 ref.clear();
                 it.remove();
@@ -943,8 +943,8 @@
      * <tt>_head.next().prev()</tt> and <tt>_head.prev().next()</tt> to be
      * non-null, as when I am a sublist for some larger list.
      * Use <tt>== _head.next()</tt> and <tt>== _head.prev()</tt> to determine
-     * if a given 
-     * {@link org.apache.commons.collections.CursorableLinkedList.Listable} 
+     * if a given
+     * {@link org.apache.commons.collections.CursorableLinkedList.Listable}
      * is the first or last element in the list.
      */
     protected transient Listable _head = new Listable(null,null,null);

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/EvictionTimer.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/EvictionTimer.java?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/EvictionTimer.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/EvictionTimer.java Sat May 23 00:00:44 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -32,16 +32,16 @@
  * <p>
  * This class has package scope to prevent its inclusion in the pool public API.
  * The class declaration below should *not* be changed to public.
- * </p> 
+ * </p>
  */
 class EvictionTimer {
     private static Timer _timer;
     private static int _usageCount;
-    
+
     private EvictionTimer() {
         // Hide the default constuctor
     }
-    
+
     /**
      * Add the specified eviction task to the timer. Tasks that are added with a
      * call to this method *must* call {@link #cancel(TimerTask)} to cancel the
@@ -58,7 +58,7 @@
         _usageCount++;
         _timer.schedule(task, delay, period);
     }
-    
+
     /**
      * Remove the specified eviction task from the timer.
      * @param task      Task to be scheduled

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java Sat May 23 00:00:44 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -39,7 +39,7 @@
  * When coupled with the appropriate {@link KeyedPoolableObjectFactory},
  * <code>GenericKeyedObjectPool</code> provides robust pooling functionality for
  * keyed objects. A <code>GenericKeyedObjectPool</code> can be viewed as a map
- * of pools, keyed on the (unique) key values provided to the 
+ * of pools, keyed on the (unique) key values provided to the
  * {@link #preparePool preparePool}, {@link #addObject addObject} or
  * {@link #borrowObject borrowObject} methods. Each time a new key value is
  * provided to one of these methods, a new pool is created under the given key
@@ -144,7 +144,7 @@
  *   specifies the minimum amount of time that an object may sit idle in the
  *   pool before it is eligible for eviction due to idle time.  When
  *   non-positive, no object will be dropped from the pool due to idle time
- *   alone.  This setting has no effect unless 
+ *   alone.  This setting has no effect unless
  *   <code>timeBetweenEvictionRunsMillis > 0.</code>  The default setting
  *   for this parameter is 30 minutes.
  *  </li>
@@ -153,14 +153,14 @@
  *   objects should be validated using the factory's
  *   {@link KeyedPoolableObjectFactory#validateObject validateObject} method
  *   during idle object eviction runs.  Objects that fail to validate will be
- *   dropped from the pool. This setting has no effect unless 
+ *   dropped from the pool. This setting has no effect unless
  *   <code>timeBetweenEvictionRunsMillis > 0.</code>  The default setting
  *   for this parameter is <code>false.</code>
  *  </li>
  *  <li>
  *    {@link #setMinIdle minIdle} sets a target value for the minimum number of
  *    idle objects (per key) that should always be available. If this parameter
- *    is set to a positive number and 
+ *    is set to a positive number and
  *    <code>timeBetweenEvictionRunsMillis > 0,</code> each time the idle object
  *    eviction thread runs, it will try to create enough idle instances so that
  *    there will be <code>minIdle</code> idle instances available under each
@@ -178,8 +178,8 @@
  * <ul>
  *  <li>
  *   {@link #setLifo <i>Lifo</i>}
- *   determines whether or not the pools return idle objects in 
- *   last-in-first-out order. The default setting for this parameter is 
+ *   determines whether or not the pools return idle objects in
+ *   last-in-first-out order. The default setting for this parameter is
  *   <code>true.</code>
  *  </li>
  * </ul>
@@ -337,7 +337,7 @@
      * @see #getMinIdle
      */
     public static final int DEFAULT_MIN_IDLE = 0;
-    
+
     /**
      * The default LIFO status. True means that borrowObject returns the
      * most recently used ("last in") idle object in a pool (if there are
@@ -347,7 +347,7 @@
      * @see #setLifo
      */
     public static final boolean DEFAULT_LIFO = true;
-    
+
     //--- constructors -----------------------------------------------
 
     /**
@@ -472,7 +472,7 @@
     public GenericKeyedObjectPool(KeyedPoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, int maxTotal, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle) {
         this(factory, maxActive, whenExhaustedAction, maxWait, maxIdle, maxTotal, GenericKeyedObjectPool.DEFAULT_MIN_IDLE, testOnBorrow, testOnReturn, timeBetweenEvictionRunsMillis, numTestsPerEvictionRun, minEvictableIdleTimeMillis, testWhileIdle);
     }
-    
+
     /**
      * Create a new <code>GenericKeyedObjectPool</code> using the specified values.
      * @param factory the <code>KeyedPoolableObjectFactory</code> to use to create, validate, and destroy objects if not <code>null</code>
@@ -493,7 +493,7 @@
     public GenericKeyedObjectPool(KeyedPoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, int maxTotal, int minIdle, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle) {
         this(factory, maxActive, whenExhaustedAction, maxWait, maxIdle, maxTotal, minIdle, testOnBorrow, testOnReturn, timeBetweenEvictionRunsMillis, numTestsPerEvictionRun, minEvictableIdleTimeMillis, testWhileIdle, DEFAULT_LIFO);
     }
-    
+
     /**
      * Create a new <code>GenericKeyedObjectPool</code> using the specified values.
      * @param factory the <code>KeyedPoolableObjectFactory</code> to use to create, validate, and destroy objects if not <code>null</code>
@@ -509,7 +509,7 @@
      * @param numTestsPerEvictionRun the number of idle objects to examine per run within the idle object eviction thread (if any) (see {@link #setNumTestsPerEvictionRun})
      * @param minEvictableIdleTimeMillis the minimum number of milliseconds an object can sit idle in the pool before it is eligible for eviction (see {@link #setMinEvictableIdleTimeMillis})
      * @param testWhileIdle whether or not to validate objects in the idle object eviction thread, if any (see {@link #setTestWhileIdle})
-     * @param lifo whether or not the pools behave as LIFO (last in first out) queues (see {@link #setLifo}) 
+     * @param lifo whether or not the pools behave as LIFO (last in first out) queues (see {@link #setLifo})
      * @since Pool 1.4
      */
     public GenericKeyedObjectPool(KeyedPoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, int maxTotal, int minIdle, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle, boolean lifo) {
@@ -550,7 +550,7 @@
      * Returns the cap on the number of object instances allocated by the pool
      * (checked out or idle),  per key.
      * A negative value indicates no limit.
-     * 
+     *
      * @return the cap on the number of active instances per key.
      * @see #setMaxActive
      */
@@ -562,7 +562,7 @@
      * Sets the cap on the number of object instances managed by the pool per key.
      * @param maxActive The cap on the number of object instances per key.
      * Use a negative value for no limit.
-     * 
+     *
      * @see #getMaxActive
      */
     public synchronized void setMaxActive(int maxActive) {
@@ -587,7 +587,7 @@
      * when at the limit with no idle instances available, an attempt is made to
      * create room by clearing the oldest 15% of the elements from the keyed
      * pools.
-     * 
+     *
      * @param maxTotal The cap on the total number of instances across pools.
      * Use a negative value for no limit.
      * @see #getMaxTotal
@@ -602,7 +602,7 @@
      * is invoked when the pool is exhausted (the maximum number
      * of "active" objects has been reached).
      *
-     * @return one of {@link #WHEN_EXHAUSTED_BLOCK}, 
+     * @return one of {@link #WHEN_EXHAUSTED_BLOCK},
      * {@link #WHEN_EXHAUSTED_FAIL} or {@link #WHEN_EXHAUSTED_GROW}
      * @see #setWhenExhaustedAction
      */
@@ -703,7 +703,7 @@
 
     /**
      * Sets the minimum number of idle objects to maintain in each of the keyed
-     * pools. This setting has no effect unless 
+     * pools. This setting has no effect unless
      * <code>timeBetweenEvictionRunsMillis > 0</code> and attempts to ensure
      * that each pool has the required minimum number of instances are only
      * made during idle object eviction runs.
@@ -718,7 +718,7 @@
 
     /**
      * Returns the minimum number of idle objects to maintain in each of the keyed
-     * pools. This setting has no effect unless 
+     * pools. This setting has no effect unless
      * <code>timeBetweenEvictionRunsMillis > 0</code> and attempts to ensure
      * that each pool has the required minimum number of instances are only
      * made during idle object eviction runs.
@@ -916,14 +916,14 @@
         setMinEvictableIdleTimeMillis(conf.minEvictableIdleTimeMillis);
         setTimeBetweenEvictionRunsMillis(conf.timeBetweenEvictionRunsMillis);
     }
-    
+
     /**
      * Whether or not the idle object pools act as LIFO queues. True means
      * that borrowObject returns the most recently used ("last in") idle object
      * in a pool (if there are idle instances available).  False means that
      * the pools behave as FIFO queues - objects are taken from idle object
      * pools in the order that they are returned.
-     * 
+     *
      * @return <code>true</code> if the pools are configured to act as LIFO queues
      * @since 1.4
      */
@@ -937,7 +937,7 @@
       * idle instances available).  False means that the pools behave as FIFO
       * queues - objects are taken from idle object pools in the order that
       * they are returned.
-      * 
+      *
       * @param lifo the new value for the lifo property
       * @since 1.4
       */
@@ -955,18 +955,18 @@
         synchronized (this) {
             // Get local copy of current config. Can't sync when used later as
             // it can result in a deadlock. Has the added advantage that config
-            // is consistent for entire method execution 
+            // is consistent for entire method execution
             whenExhaustedAction = _whenExhaustedAction;
             maxWait = _maxWait;
-            
-            // Add this request to the queue 
+
+            // Add this request to the queue
             _allocationQueue.add(latch);
-            
+
             // Work the allocation queue, allocating idle instances and
             // instance creation permits in request arrival order
             allocate();
         }
-        
+
         for(;;) {
             synchronized (this) {
                 assertOpen();
@@ -1103,7 +1103,7 @@
                     // Next item in queue
                     continue;
                 }
-                
+
                 // If there is a totalMaxActive and we are at the limit then
                 // we have to make room
                 if ((_maxTotal > 0)
@@ -1158,7 +1158,7 @@
     public void clearOldest() {
         // Map of objects to destroy my key
         final Map toDestroy = new HashMap();
-        
+
         // build sorted map of idle objects
         final Map map = new TreeMap();
         synchronized (this) {
@@ -1176,7 +1176,7 @@
             // Now iterate created map and kill the first 15% plus one to account for zero
             Set setPairKeys = map.entrySet();
             int itemsToRemove = ((int) (map.size() * 0.15)) + 1;
-            
+
             Iterator iter = setPairKeys.iterator();
             while (iter.hasNext() && itemsToRemove > 0) {
                 Map.Entry entry = (Map.Entry) iter.next();
@@ -1185,7 +1185,7 @@
                 // key references is the key of the list it belongs to.
                 Object key = entry.getValue();
                 ObjectTimestampPair pairTimeStamp = (ObjectTimestampPair) entry.getKey();
-                final CursorableLinkedList list = 
+                final CursorableLinkedList list =
                     ((ObjectQueue)(_poolMap.get(key))).queue;
                 list.remove(pairTimeStamp);
 
@@ -1217,7 +1217,7 @@
      */
     public void clear(Object key) {
         Map toDestroy = new HashMap();
-        
+
         final ObjectQueue pool;
         synchronized (this) {
             pool = (ObjectQueue)(_poolMap.remove(key));
@@ -1255,7 +1255,7 @@
                     }
                 }
             }
-            
+
         }
     }
 
@@ -1311,14 +1311,14 @@
                     // swallowed
                 }
                 // TODO: Correctness here depends on control in addObjectToPool.
-                // These two methods should be refactored, removing the 
+                // These two methods should be refactored, removing the
                 // "behavior flag",decrementNumActive, from addObjectToPool.
                 ObjectQueue pool = (ObjectQueue) (_poolMap.get(key));
                 if (pool != null) {
                     synchronized(this) {
                         pool.decrementActiveCount();
                         allocate();
-                    }  
+                    }
                 }
             }
         }
@@ -1337,7 +1337,7 @@
 
         boolean shouldDestroy = !success;
         ObjectQueue pool;
-        
+
         // Add instance to pool if there is room and it has passed validation
         // (if testOnreturn is set)
         synchronized (this) {
@@ -1360,7 +1360,7 @@
                     // borrowObject always takes the first element from the queue,
                     // so for LIFO, push on top, FIFO add to end
                     if (_lifo) {
-                        pool.queue.addFirst(new ObjectTimestampPair(obj)); 
+                        pool.queue.addFirst(new ObjectTimestampPair(obj));
                     } else {
                         pool.queue.addLast(new ObjectTimestampPair(obj));
                     }
@@ -1373,7 +1373,7 @@
             }
         }
 
-        // Destroy the instance if necessary 
+        // Destroy the instance if necessary
         if(shouldDestroy) {
             try {
                 _factory.destroyObject(key, obj);
@@ -1510,12 +1510,12 @@
 
     /**
      * <p>Perform <code>numTests</code> idle object eviction tests, evicting
-     * examined objects that meet the criteria for eviction. If 
+     * examined objects that meet the criteria for eviction. If
      * <code>testWhileIdle</code> is true, examined objects are validated
      * when visited (and removed if invalid); otherwise only objects that
      * have been idle for more than <code>minEvicableIdletimeMillis</code>
      * are removed.</p>
-     * 
+     *
      * <p>Successive activations of this method examine objects in keyed pools
      * in sequence, cycling through the keys and examining objects in
      * oldest-to-youngest order within the keyed pools.</p>
@@ -1526,21 +1526,21 @@
         Object key = null;
         boolean testWhileIdle;
         long minEvictableIdleTimeMillis;
-        
+
         synchronized (this) {
             // Get local copy of current config. Can't sync when used later as
             // it can result in a deadlock. Has the added advantage that config
-            // is consistent for entire method execution 
+            // is consistent for entire method execution
             testWhileIdle = _testWhileIdle;
             minEvictableIdleTimeMillis = _minEvictableIdleTimeMillis;
-            
+
             // Initialize key to last key value
-            if (_evictionKeyCursor != null && 
+            if (_evictionKeyCursor != null &&
                     _evictionKeyCursor._lastReturned != null) {
                 key = _evictionKeyCursor._lastReturned.value();
             }
         }
-        
+
         for (int i=0,m=getNumTests(); i<m; i++) {
             final ObjectTimestampPair pair;
             synchronized (this) {
@@ -1571,12 +1571,12 @@
                             }
                         }
                     }
-                }  
+                }
 
                 if (_evictionCursor == null) {
                     continue; // should never happen; do nothing
                 }
-                
+
                 // If eviction cursor is exhausted, try to move
                 // to the next key and reset
                 if((_lifo && !_evictionCursor.hasPrevious()) ||
@@ -1602,10 +1602,10 @@
                     continue; // reset failed, do nothing
                 }
 
-                // if LIFO and the _evictionCursor has a previous object, 
+                // if LIFO and the _evictionCursor has a previous object,
                 // or FIFO and _evictionCursor has a next object, test it
-                pair = _lifo ? 
-                        (ObjectTimestampPair) _evictionCursor.previous() : 
+                pair = _lifo ?
+                        (ObjectTimestampPair) _evictionCursor.previous() :
                         (ObjectTimestampPair) _evictionCursor.next();
                 _evictionCursor.remove();
                 _totalIdle--;
@@ -1614,7 +1614,7 @@
 
             boolean removeObject=false;
             if((minEvictableIdleTimeMillis > 0) &&
-               (System.currentTimeMillis() - pair.tstamp > 
+               (System.currentTimeMillis() - pair.tstamp >
                minEvictableIdleTimeMillis)) {
                 removeObject=true;
             }
@@ -1638,7 +1638,7 @@
                     }
                 }
             }
-            
+
             if(removeObject) {
                 try {
                     _factory.destroyObject(key, pair.value);
@@ -1653,12 +1653,12 @@
                     // drop that pool
                     if (_minIdle == 0) {
                         synchronized (this) {
-                            ObjectQueue objectQueue = 
+                            ObjectQueue objectQueue =
                                 (ObjectQueue)_poolMap.get(key);
-                            if (objectQueue != null && 
+                            if (objectQueue != null &&
                                     objectQueue.queue.isEmpty()) {
                                 _poolMap.remove(key);
-                                _poolList.remove(key);  
+                                _poolList.remove(key);
                             }
                         }
                     }
@@ -1669,7 +1669,7 @@
                     _evictionCursor.add(pair);
                     _totalIdle++;
                     if (_lifo) {
-                        // Skip over the element we just added back 
+                        // Skip over the element we just added back
                         _evictionCursor.previous();
                     }
                 }
@@ -1677,7 +1677,7 @@
             }
         }
     }
-    
+
     /**
      * Resets the eviction key cursor and closes any
      * associated eviction object cursor
@@ -1690,25 +1690,25 @@
         if (null != _evictionCursor) {
             _evictionCursor.close();
             _evictionCursor = null;
-        }  
+        }
     }
-    
+
     /**
      * Resets the eviction object cursor for the given key
-     * 
+     *
      * @param key eviction key
      */
     private void resetEvictionObjectCursor(Object key) {
         if (_evictionCursor != null) {
             _evictionCursor.close();
         }
-        if (_poolMap == null) { 
+        if (_poolMap == null) {
             return;
         }
         ObjectQueue pool = (ObjectQueue) (_poolMap.get(key));
         if (pool != null) {
             CursorableLinkedList queue = pool.queue;
-            _evictionCursor = queue.cursor(_lifo ? queue.size() : 0);   
+            _evictionCursor = queue.cursor(_lifo ? queue.size() : 0);
         }
     }
 
@@ -1765,7 +1765,7 @@
         // to stop when another thread already returned the
         // needed objects
         int objectDeficit = calculateDefecit(pool, false);
-        
+
         for (int i = 0; i < objectDeficit && calculateDefecit(pool, true) > 0; i++) {
             try {
                 addObject(key);
@@ -1897,7 +1897,7 @@
             internalProcessingCount--;
         }
     }
-    
+
     /**
      * A simple "struct" encapsulating an object instance and a timestamp.
      *
@@ -2043,21 +2043,21 @@
         private synchronized Object getkey() {
             return _key;
         }
-        
+
         private synchronized ObjectQueue getPool() {
             return _pool;
         }
         private synchronized void setPool(ObjectQueue pool) {
             _pool = pool;
         }
-        
+
         private synchronized ObjectTimestampPair getPair() {
             return _pair;
         }
         private synchronized void setPair(ObjectTimestampPair pair) {
             _pair = pair;
         }
-        
+
         private synchronized boolean mayCreate() {
             return _mayCreate;
         }
@@ -2067,7 +2067,7 @@
 
         /**
          * Reset the latch data. Used when an allocation fails and the latch
-         * needs to be re-added to the queue. 
+         * needs to be re-added to the queue.
          */
         private synchronized void reset() {
             _pair = null;
@@ -2104,7 +2104,7 @@
      * @see #getMaxTotal
      */
     private int _maxTotal = DEFAULT_MAX_TOTAL;
-    
+
     /**
      * The maximum amount of time (in millis) the
      * {@link #borrowObject} method should block before throwing
@@ -2243,13 +2243,13 @@
      * @see GenericKeyedObjectPool.Evictor#run
      */
     private CursorableLinkedList _poolList = null;
-    
+
     private CursorableLinkedList.Cursor _evictionCursor = null;
     private CursorableLinkedList.Cursor _evictionKeyCursor = null;
-    
+
     /** Whether or not the pools behave as LIFO queues (last in first out) */
     private boolean _lifo = DEFAULT_LIFO;
-    
+
     /**
      * Used to track the order in which threads call {@link #borrowObject()} so
      * that objects can be allocated in the order in which the threads requested

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPoolFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPoolFactory.java?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPoolFactory.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPoolFactory.java Sat May 23 00:00:44 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -201,7 +201,7 @@
     public GenericKeyedObjectPoolFactory(KeyedPoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, int maxTotal, int minIdle, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle) {
         this(factory, maxActive, whenExhaustedAction, maxWait, maxIdle, maxTotal, minIdle, testOnBorrow, testOnReturn, timeBetweenEvictionRunsMillis, numTestsPerEvictionRun, minEvictableIdleTimeMillis, testWhileIdle, GenericKeyedObjectPool.DEFAULT_LIFO);
     }
-    
+
     /**
      * Create a new GenericKeyedObjectPoolFactory.
      *

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java Sat May 23 00:00:44 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -132,29 +132,29 @@
  *   {@link #setTestWhileIdle <i>testWhileIdle</i>} indicates whether or not idle
  *   objects should be validated using the factory's
  *   {@link PoolableObjectFactory#validateObject} method. Objects that fail to
- *   validate will be dropped from the pool. This setting has no effect unless 
+ *   validate will be dropped from the pool. This setting has no effect unless
  *   <code>timeBetweenEvictionRunsMillis > 0.</code>  The default setting for
  *   this parameter is <code>false.</code>
  *  </li>
  *  <li>
- *   {@link #setSoftMinEvictableIdleTimeMillis <i>softMinEvictableIdleTimeMillis</i>} 
+ *   {@link #setSoftMinEvictableIdleTimeMillis <i>softMinEvictableIdleTimeMillis</i>}
  *   specifies the minimum amount of time an object may sit idle in the pool
  *   before it is eligible for eviction by the idle object evictor
- *   (if any), with the extra condition that at least "minIdle" object instances 
+ *   (if any), with the extra condition that at least "minIdle" object instances
  *   remain in the pool.  When non-positive, no objects will be evicted from the pool
  *   due to idle time alone. This setting has no effect unless
  *   <code>timeBetweenEvictionRunsMillis > 0.</code> and it is superceded by
- *   {@link #setMinEvictableIdleTimeMillis <i>minEvictableIdleTimeMillis</i>} 
- *   (that is, if <code>minEvictableIdleTimeMillis</code> is positive, then 
+ *   {@link #setMinEvictableIdleTimeMillis <i>minEvictableIdleTimeMillis</i>}
+ *   (that is, if <code>minEvictableIdleTimeMillis</code> is positive, then
  *   <code>softMinEvictableIdleTimeMillis</code> is ignored). The default setting for
  *   this parameter is -1 (disabled).
  *  </li>
  *  <li>
  *   {@link #setNumTestsPerEvictionRun <i>numTestsPerEvictionRun</i>}
  *   determines the number of objects examined in each run of the idle object
- *   evictor. This setting has no effect unless 
+ *   evictor. This setting has no effect unless
  *   <code>timeBetweenEvictionRunsMillis > 0.</code>  The default setting for
- *   this parameter is 3.  
+ *   this parameter is 3.
  *  </li>
  * </ul>
  * <p>
@@ -166,7 +166,7 @@
  * <ul>
  *  <li>
  *   {@link #setLifo <i>lifo</i>}
- *   determines whether or not the pool returns idle objects in 
+ *   determines whether or not the pool returns idle objects in
  *   last-in-first-out order. The default setting for this parameter is
  *   <code>true.</code>
  *  </li>
@@ -256,7 +256,7 @@
      * @see #setWhenExhaustedAction
      */
     public static final byte DEFAULT_WHEN_EXHAUSTED_ACTION = WHEN_EXHAUSTED_BLOCK;
-    
+
     /**
      * The default LIFO status. True means that borrowObject returns the
      * most recently used ("last in") idle object in the pool (if there are
@@ -475,7 +475,7 @@
     public GenericObjectPool(PoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, int minIdle, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle, long softMinEvictableIdleTimeMillis) {
         this(factory, maxActive, whenExhaustedAction, maxWait, maxIdle, minIdle, testOnBorrow, testOnReturn, timeBetweenEvictionRunsMillis, numTestsPerEvictionRun, minEvictableIdleTimeMillis, testWhileIdle, softMinEvictableIdleTimeMillis, DEFAULT_LIFO);
     }
-    
+
     /**
      * Create a new <tt>GenericObjectPool</tt> using the specified values.
      * @param factory the (possibly <tt>null</tt>)PoolableObjectFactory to use to create, validate and destroy objects
@@ -531,7 +531,7 @@
      * (checked out to clients, or idle awaiting checkout) at a given time.
      * When non-positive, there is no limit to the number of objects that can
      * be managed by the pool at one time.
-     * 
+     *
      * @return the cap on the total number of object instances managed by the pool.
      * @see #setMaxActive
      */
@@ -543,7 +543,7 @@
      * Sets the cap on the number of objects that can be allocated by the pool
      * (checked out to clients, or idle awaiting checkout) at a given time. Use
      * a negative value for no limit.
-     * 
+     *
      * @param maxActive The cap on the total number of object instances managed by the pool.
      * Negative values mean that there is no limit to the number of objects allocated
      * by the pool.
@@ -659,7 +659,7 @@
     /**
      * Sets the minimum number of objects allowed in the pool
      * before the evictor thread (if active) spawns new objects.
-     * Note that no objects are created when 
+     * Note that no objects are created when
      * <code>numActive + numIdle >= maxActive.</code>
      * This setting has no effect if the idle object evictor is disabled
      * (i.e. if <code>timeBetweenEvictionRunsMillis <= 0</code>).
@@ -880,14 +880,14 @@
     public synchronized void setTestWhileIdle(boolean testWhileIdle) {
         _testWhileIdle = testWhileIdle;
     }
-    
+
     /**
      * Whether or not the idle object pool acts as a LIFO queue. True means
      * that borrowObject returns the most recently used ("last in") idle object
      * in the pool (if there are idle instances available).  False means that
      * the pool behaves as a FIFO queue - objects are taken from the idle object
      * pool in the order that they are returned to the pool.
-     * 
+     *
      * @return <code>true</true> if the pool is configured to act as a LIFO queue
      * @since 1.4
      */
@@ -901,7 +901,7 @@
       * idle instances available).  False means that the pool behaves as a FIFO
       * queue - objects are taken from the idle object pool in the order that
       * they are returned to the pool.
-      * 
+      *
       * @param lifo the new value for the LIFO property
       * @since 1.4
       */
@@ -942,13 +942,13 @@
         synchronized (this) {
             // Get local copy of current config. Can't sync when used later as
             // it can result in a deadlock. Has the added advantage that config
-            // is consistent for entire method execution 
+            // is consistent for entire method execution
             whenExhaustedAction = _whenExhaustedAction;
             maxWait = _maxWait;
-            
-            // Add this request to the queue 
+
+            // Add this request to the queue
             _allocationQueue.add(latch);
-            
+
             // Work the allocation queue, allocating idle instances and
             // instance creation permits in request arrival order
             allocate();
@@ -958,7 +958,7 @@
             synchronized (this) {
                 assertOpen();
             }
-                
+
             // If no object was allocated from the pool above
             if(latch.getPair() == null) {
                 // check if we were allowed to create one
@@ -993,7 +993,7 @@
                                 }
                             } catch(InterruptedException e) {
                                 Thread.currentThread().interrupt();
-                                throw e; 
+                                throw e;
                             }
                             if(maxWait > 0 && ((System.currentTimeMillis() - starttime) >= maxWait)) {
                                 throw new NoSuchElementException("Timeout waiting for idle object");
@@ -1114,7 +1114,7 @@
      */
     public void clear() {
         List toDestroy = new ArrayList();
-        
+
         synchronized(this) {
             toDestroy.addAll(_pool);
             _numInternalProcessing = _numInternalProcessing + _pool._size;
@@ -1167,7 +1167,7 @@
      * discard references to returned objects and ensure that an object is not
      * returned to the pool multiple times in sequence (i.e., without being
      * borrowed again between returns). Violating this contract will result in
-     * the same object appearing multiple times in the pool and pool counters 
+     * the same object appearing multiple times in the pool and pool counters
      * (numActive, numIdle) returning incorrect values.</p>
      */
     public void returnObject(Object obj) throws Exception {
@@ -1181,7 +1181,7 @@
                     // swallowed
                 }
                 // TODO: Correctness here depends on control in addObjectToPool.
-                // These two methods should be refactored, removing the 
+                // These two methods should be refactored, removing the
                 // "behavior flag",decrementNumActive, from addObjectToPool.
                 synchronized(this) {
                     _numActive--;
@@ -1225,7 +1225,7 @@
             }
         }
 
-        // Destroy the instance if necessary 
+        // Destroy the instance if necessary
         if(shouldDestroy) {
             try {
                 _factory.destroyObject(obj);
@@ -1240,7 +1240,7 @@
                 }
             }
         }
-        
+
     }
 
     public void close() throws Exception {
@@ -1278,13 +1278,13 @@
 
     /**
      * <p>Perform <code>numTests</code> idle object eviction tests, evicting
-     * examined objects that meet the criteria for eviction. If 
+     * examined objects that meet the criteria for eviction. If
      * <code>testWhileIdle</code> is true, examined objects are validated
      * when visited (and removed if invalid); otherwise only objects that
      * have been idle for more than <code>minEvicableIdletimeMillis</code>
      * are removed.</p>
-     * 
-     * <p>Successive activations of this method examine objects in 
+     *
+     * <p>Successive activations of this method examine objects in
      * in sequence, cycling through objects in oldest-to-youngest order.</p>
      *
      * @throws Exception if the pool is closed or eviction fails.
@@ -1297,26 +1297,26 @@
             }
             if (null == _evictionCursor) {
                 _evictionCursor = (_pool.cursor(_lifo ? _pool.size() : 0));
-            }  
+            }
         }
 
         for (int i=0,m=getNumTests();i<m;i++) {
             final ObjectTimestampPair pair;
             synchronized (this) {
-                if ((_lifo && !_evictionCursor.hasPrevious()) || 
+                if ((_lifo && !_evictionCursor.hasPrevious()) ||
                         !_lifo && !_evictionCursor.hasNext()) {
                     _evictionCursor.close();
                     _evictionCursor = _pool.cursor(_lifo ? _pool.size() : 0);
                 }
-                
-                pair = _lifo ? 
-                        (ObjectTimestampPair) _evictionCursor.previous() : 
+
+                pair = _lifo ?
+                        (ObjectTimestampPair) _evictionCursor.previous() :
                         (ObjectTimestampPair) _evictionCursor.next();
-                
+
                 _evictionCursor.remove();
                 _numInternalProcessing++;
             }
-                        
+
             boolean removeObject = false;
             final long idleTimeMilis = System.currentTimeMillis() - pair.tstamp;
             if ((getMinEvictableIdleTimeMillis() > 0)
@@ -1347,7 +1347,7 @@
                     }
                 }
             }
-            
+
             if (removeObject) {
                 try {
                     _factory.destroyObject(pair.value);
@@ -1359,7 +1359,7 @@
                 if(!removeObject) {
                     _evictionCursor.add(pair);
                     if (_lifo) {
-                        // Skip over the element we just added back 
+                        // Skip over the element we just added back
                         _evictionCursor.previous();
                     }
                 }
@@ -1555,7 +1555,7 @@
          * @see GenericObjectPool#setLifo
          */
         public boolean lifo = GenericObjectPool.DEFAULT_LIFO;
-    
+
     }
 
     /**
@@ -1566,14 +1566,14 @@
     private static final class Latch {
         private ObjectTimestampPair _pair;
         private boolean _mayCreate = false;
-        
+
         private synchronized ObjectTimestampPair getPair() {
             return _pair;
         }
         private synchronized void setPair(ObjectTimestampPair pair) {
             _pair = pair;
         }
-        
+
         private synchronized boolean mayCreate() {
             return _mayCreate;
         }
@@ -1583,7 +1583,7 @@
 
         /**
          * Reset the latch data. Used when an allocation fails and the latch
-         * needs to be re-added to the queue. 
+         * needs to be re-added to the queue.
          */
         private synchronized void reset() {
             _pair = null;
@@ -1739,10 +1739,10 @@
 
     /** Whether or not the pool behaves as a LIFO queue (last in first out) */
     private boolean _lifo = DEFAULT_LIFO;
-    
+
     /** My pool. */
     private CursorableLinkedList _pool = null;
-    
+
     /** Eviction cursor - keeps track of idle object evictor position */
     private CursorableLinkedList.Cursor _evictionCursor = null;
 

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPoolFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPoolFactory.java?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPoolFactory.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPoolFactory.java Sat May 23 00:00:44 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -142,7 +142,7 @@
     public GenericObjectPoolFactory(PoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle) {
         this(factory,maxActive,whenExhaustedAction,maxWait,maxIdle,GenericObjectPool.DEFAULT_MIN_IDLE,testOnBorrow,testOnReturn,timeBetweenEvictionRunsMillis,numTestsPerEvictionRun,minEvictableIdleTimeMillis,testWhileIdle, GenericObjectPool.DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS);
     }
-    
+
     /**
      * Create a new GenericObjectPoolFactory.
      *
@@ -186,7 +186,7 @@
     public GenericObjectPoolFactory(PoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, int minIdle, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle, long softMinEvictableIdleTimeMillis) {
         this(factory,maxActive,whenExhaustedAction,maxWait,maxIdle,minIdle,testOnBorrow,testOnReturn,timeBetweenEvictionRunsMillis,numTestsPerEvictionRun,minEvictableIdleTimeMillis,testWhileIdle,softMinEvictableIdleTimeMillis, GenericObjectPool.DEFAULT_LIFO);
     }
-    
+
     /**
      * Create a new GenericObjectPoolFactory.
      *

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=777748&r1=777747&r2=777748&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 Sat May 23 00:00:44 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java Sat May 23 00:00:44 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -166,7 +166,7 @@
                         // swallowed
                     } finally {
                         obj = null;
-                    } 
+                    }
                     if (newlyMade) {
                         throw new NoSuchElementException(
                             "Could not create a validated object, cause: " +
@@ -446,7 +446,7 @@
     private void incrementActiveCount(Object key) {
         _totActive++;
         Integer old = (Integer)(_activeCount.get(key));
-        if(null == old) { 
+        if(null == old) {
             _activeCount.put(key,new Integer(1));
         } else {
             _activeCount.put(key,new Integer(old.intValue() + 1));

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPoolFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPoolFactory.java?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPoolFactory.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPoolFactory.java Sat May 23 00:00:44 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackObjectPool.java?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackObjectPool.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackObjectPool.java Sat May 23 00:00:44 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -166,7 +166,7 @@
                         // swallowed
                     } finally {
                         obj = null;
-                    } 
+                    }
                     if (newlyCreated) {
                         throw new NoSuchElementException(
                             "Could not create a validated object, cause: " +

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackObjectPoolFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackObjectPoolFactory.java?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackObjectPoolFactory.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackObjectPoolFactory.java Sat May 23 00:00:44 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,7 +34,7 @@
 public class StackObjectPoolFactory implements ObjectPoolFactory {
     /**
      * Create a new StackObjectPoolFactory.
-     * 
+     *
      * @see StackObjectPool#StackObjectPool()
      */
     public StackObjectPoolFactory() {

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/overview.html
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/overview.html?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/overview.html (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/overview.html Sat May 23 00:00:44 2009
@@ -24,51 +24,51 @@
          Generic Object pooling API with several implementations.
       </p>
       <p>
-         The <code>org.apache.commons.pool</code> package defines a simple 
-         interface for a pool of object instances, and a handful of base 
+         The <code>org.apache.commons.pool</code> package defines a simple
+         interface for a pool of object instances, and a handful of base
          classes that may be useful when creating pool implementations.
          The API supports pooling of unique objects which can be requested
          via a key as well as pools where all objects are equivalent.
       </p>
       <p>
          The <code>org.apache.commons.pool.impl</code> package contains
-         several pool implementations.  
+         several pool implementations.
          {@link org.apache.commons.pool.impl.StackObjectPool StackObjectPool}
          is useful for supporting reuse of a limited number of instances while
          allowing new instances to be created as needed to support high demand.
-         {@link org.apache.commons.pool.impl.GenericObjectPool 
+         {@link org.apache.commons.pool.impl.GenericObjectPool
          GenericObjectPool} has many configuration options and can support
          a limited set of objects such as would be useful in a database
          connection pool.
-         {@link org.apache.commons.pool.impl.SoftReferenceObjectPool 
+         {@link org.apache.commons.pool.impl.SoftReferenceObjectPool
          SoftReferenceObjectPool} has no limit on the number of objects in the
          pool, but the garbage collector can remove idle objects from the pool
          as needed.  There are also keyed versions of the first two.
       </p>
       <p>
-         Here is a simple example of pooling <code>HashMap</code>'s. First 
-         create an {@link org.apache.commons.pool.ObjectPoolFactory 
+         Here is a simple example of pooling <code>HashMap</code>'s. First
+         create an {@link org.apache.commons.pool.ObjectPoolFactory
          ObjectPoolFactory}
       </p>
 <pre>
-    public class HashMapFactory 
+    public class HashMapFactory
         extends {@link org.apache.commons.pool.BasePoolableObjectFactory BasePoolableObjectFactory}
     {
         /**
          * Creates an instance that can be returned by the pool.
          * @return an instance that can be returned by the pool.
          */
-        public Object makeObject() 
+        public Object makeObject()
             throws Exception
         {
             return new HashMap();
         }
-        
+
         /**
          * Uninitialize an instance to be returned to the pool.
          * @param obj the instance to be passivated
          */
-        public void passivateObject(Object obj) 
+        public void passivateObject(Object obj)
             throws Exception
         {
             Map map = (Map)obj;
@@ -113,8 +113,8 @@
 </pre>
 
 <p>
-The above example shows how one would use an 
-{@link org.apache.commons.pool.ObjectPool ObjectPool}.  The other supplied 
+The above example shows how one would use an
+{@link org.apache.commons.pool.ObjectPool ObjectPool}.  The other supplied
 implementations or another special purpose pool would be used similarly.
 </p>
    </body>

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/package.html
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/package.html?rev=777748&r1=777747&r2=777748&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/package.html (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/package.html Sat May 23 00:00:44 2009
@@ -24,24 +24,24 @@
          Object pooling API.
       </p>
       <p>
-         The <code>org.apache.commons.pool</code> package defines a simple 
-         interface for a pool of object instances, and a handful of base 
+         The <code>org.apache.commons.pool</code> package defines a simple
+         interface for a pool of object instances, and a handful of base
          classes that may be useful when creating pool implementations.
       </p>
       <p>
          The <code>pool</code> package itself doesn't define a specific object
          pooling implementation, but rather a contract that implementations may
-         support in order to be fully interchangeable.         
+         support in order to be fully interchangeable.
       </p>
       <p>
          The <code>pool</code> package separates the way in which instances are
-         pooled from the way in which they are created, resulting in a pair of 
+         pooled from the way in which they are created, resulting in a pair of
          interfaces:
       </p>
       <dl>
         <dt>{@link org.apache.commons.pool.ObjectPool ObjectPool}</dt>
         <dd>
-          defines a simple object pooling interface, with methods for 
+          defines a simple object pooling interface, with methods for
           borrowing instances from and returning them to the pool.
         </dd>
         <dt>{@link org.apache.commons.pool.PoolableObjectFactory PoolableObjectFactory}</dt>
@@ -50,7 +50,7 @@
           By associating a factory with a pool, the pool can create new object
           instances as needed.
         </dd>
-      </dl>        
+      </dl>
       <p>
         {@link org.apache.commons.pool.ObjectPoolFactory ObjectPoolFactory}
         defines a simple factory for <code>ObjectPool</code>s, which may be
@@ -58,11 +58,11 @@
       </p>
       <p>
          The <code>pool</code> package also provides a keyed pool interface,
-         which pools instances of multiple types, accessed according to an 
+         which pools instances of multiple types, accessed according to an
          arbitrary key. See
          {@link org.apache.commons.pool.KeyedObjectPool KeyedObjectPool},
          {@link org.apache.commons.pool.KeyedPoolableObjectFactory KeyedPoolableObjectFactory},
-         and 
+         and
          {@link org.apache.commons.pool.KeyedObjectPoolFactory KeyedObjectPoolFactory}.
       </p>
    </body>



Mime
View raw message