commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1566584 - in /commons/proper/pool/trunk/src: changes/ main/java/org/apache/commons/pool2/ main/java/org/apache/commons/pool2/impl/ test/java/org/apache/commons/pool2/ test/java/org/apache/commons/pool2/impl/
Date Mon, 10 Feb 2014 11:32:16 GMT
Author: markt
Date: Mon Feb 10 11:32:16 2014
New Revision: 1566584

URL: http://svn.apache.org/r1566584
Log:
Fix POOL-249 (Java 8 javadoc fixes) with a patch by Ville Skyttä
Also fix all the remaining Javadoc warnings

Modified:
    commons/proper/pool/trunk/src/changes/changes.xml
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BaseKeyedPooledObjectFactory.java
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BaseObjectPool.java
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BasePooledObjectFactory.java
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/KeyedObjectPool.java
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/KeyedPooledObjectFactory.java
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/ObjectPool.java
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/PoolUtils.java
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/PooledObjectFactory.java
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/AbandonedConfig.java
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/SoftReferenceObjectPool.java
    commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/TestBaseObjectPool.java
    commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/TestKeyedObjectPool.java
    commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/TestObjectPool.java
    commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestAbandonedObjectPool.java
    commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java
    commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java
    commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestSoftRefOutOfMemory.java

Modified: commons/proper/pool/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/changes/changes.xml?rev=1566584&r1=1566583&r2=1566584&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/changes/changes.xml (original)
+++ commons/proper/pool/trunk/src/changes/changes.xml Mon Feb 10 11:32:16 2014
@@ -49,6 +49,12 @@ The <action> type attribute can be add,u
       Ensure that if an attempt is made to return an object multiple times that
       the current active and idle object counts are not corrupted.
     </action>
+    <action issue="POOL-249" dev="markt" type="fix" due-to="Ville Skyttä">
+      Fix Javadoc issues when building docs with Java 8.
+    </action>
+    <action dev="markt" type="fix">
+      Fix the remaining Javadoc warnings.
+    </action>
   </release>
    <release version="2.1" date="2013-12-30" description=
 "This is a maintenance release that includes a small number of new features as well as 

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BaseKeyedPooledObjectFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BaseKeyedPooledObjectFactory.java?rev=1566584&r1=1566583&r2=1566584&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BaseKeyedPooledObjectFactory.java
(original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BaseKeyedPooledObjectFactory.java
Mon Feb 10 11:32:16 2014
@@ -40,6 +40,9 @@ public abstract class BaseKeyedPooledObj
      *
      * @param key the key used when constructing the object
      * @return an instance that can be served by the pool
+     *
+     * @throws Exception if there is a problem creating a new instance,
+     *    this will be propagated to the code requesting an object.
      */
     public abstract V create(K key)
         throws Exception;

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BaseObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BaseObjectPool.java?rev=1566584&r1=1566583&r2=1566584&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BaseObjectPool.java (original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BaseObjectPool.java Mon
Feb 10 11:32:16 2014
@@ -58,7 +58,8 @@ public abstract class BaseObjectPool<T> 
      * determined (due to an exception or other problem) to be invalid.
      *
      * @param obj a {@link #borrowObject borrowed} instance to be disposed.
-     * @throws Exception
+     *
+     * @throws Exception If the object can not be invalidated
      */
     @Override
     public abstract void invalidateObject(T obj) throws Exception;
@@ -86,7 +87,8 @@ public abstract class BaseObjectPool<T> 
     /**
      * Not supported in this base implementation.
      *
-     * @throws UnsupportedOperationException
+     * @throws UnsupportedOperationException if the pool does not implement this
+     *          method
      */
     @Override
     public void clear() throws Exception, UnsupportedOperationException {
@@ -94,11 +96,11 @@ public abstract class BaseObjectPool<T> 
     }
 
     /**
-     * Not supported in this base implementation.Always throws an
-     * {@link UnsupportedOperationException}, subclasses should override this
-     * behavior.
+     * Not supported in this base implementation. Subclasses should override
+     * this behavior.
      *
-     * @throws UnsupportedOperationException
+     * @throws UnsupportedOperationException if the pool does not implement this
+     *          method
      */
     @Override
     public void addObject() throws Exception, UnsupportedOperationException {

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BasePooledObjectFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BasePooledObjectFactory.java?rev=1566584&r1=1566583&r2=1566584&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BasePooledObjectFactory.java
(original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BasePooledObjectFactory.java
Mon Feb 10 11:32:16 2014
@@ -39,6 +39,9 @@ public abstract class BasePooledObjectFa
      * activation.</p>
      *
      * @return an instance to be served by the pool
+     *
+     * @throws Exception if there is a problem creating a new instance,
+     *    this will be propagated to the code requesting an object.
      */
     public abstract T create() throws Exception;
 

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/KeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/KeyedObjectPool.java?rev=1566584&r1=1566583&r2=1566584&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/KeyedObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/KeyedObjectPool.java
Mon Feb 10 11:32:16 2014
@@ -108,7 +108,7 @@ public interface KeyedObjectPool<K,V> {
      * @param key the key used to obtain the object
      * @param obj a {@link #borrowObject borrowed} instance to be returned.
      *
-     * @throws Exception
+     * @throws Exception if an instance cannot be returned to the pool
      */
     void returnObject(K key, V obj) throws Exception;
 
@@ -127,7 +127,7 @@ public interface KeyedObjectPool<K,V> {
      * @param key the key used to obtain the object
      * @param obj a {@link #borrowObject borrowed} instance to be returned.
      *
-     * @throws Exception
+     * @throws Exception if the instance cannot be invalidated
      */
     void invalidateObject(K key, V obj) throws Exception;
 
@@ -192,6 +192,8 @@ public interface KeyedObjectPool<K,V> {
      *
      * @throws UnsupportedOperationException when this implementation doesn't
      *                                       support the operation
+     *
+     * @throws Exception if the pool cannot be cleared
      */
     void clear() throws Exception, UnsupportedOperationException;
 
@@ -203,6 +205,8 @@ public interface KeyedObjectPool<K,V> {
      *
      * @throws UnsupportedOperationException when this implementation doesn't
      *                                       support the operation
+     *
+     * @throws Exception if the key cannot be cleared
      */
     void clear(K key) throws Exception, UnsupportedOperationException;
 

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/KeyedPooledObjectFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/KeyedPooledObjectFactory.java?rev=1566584&r1=1566583&r2=1566584&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/KeyedPooledObjectFactory.java
(original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/KeyedPooledObjectFactory.java
Mon Feb 10 11:32:16 2014
@@ -60,7 +60,7 @@ package org.apache.commons.pool2;
  * <p>
  * While clients of a {@link KeyedObjectPool} borrow and return instances of
  * the underlying value type V, the factory methods act on instances of
- * {@link PooledObject PooledObject<V>}.  These are the object wrappers that
+ * {@link PooledObject PooledObject&lt;V&gt;}.  These are the object wrappers that
  * pools use to track and maintain state informations about the objects that
  * they manage.
  *

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/ObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/ObjectPool.java?rev=1566584&r1=1566583&r2=1566584&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/ObjectPool.java (original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/ObjectPool.java Mon Feb
10 11:32:16 2014
@@ -95,7 +95,7 @@ public interface ObjectPool<T> {
      *
      * @param obj a {@link #borrowObject borrowed} instance to be returned.
      *
-     * @throws Exception
+     * @throws Exception if an instance cannot be returned to the pool
      */
     void returnObject(T obj) throws Exception;
 
@@ -111,7 +111,7 @@ public interface ObjectPool<T> {
      *
      * @param obj a {@link #borrowObject borrowed} instance to be disposed.
      *
-     * @throws Exception
+     * @throws Exception if the instance cannot be invalidated
      */
     void invalidateObject(T obj) throws Exception;
 
@@ -154,6 +154,8 @@ public interface ObjectPool<T> {
      *
      * @throws UnsupportedOperationException
      *              if this implementation does not support the operation
+     *
+     * @throws Exception if the pool cannot be cleared
      */
     void clear() throws Exception, UnsupportedOperationException;
 

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/PoolUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/PoolUtils.java?rev=1566584&r1=1566583&r2=1566584&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/PoolUtils.java (original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/PoolUtils.java Mon Feb
10 11:32:16 2014
@@ -1540,7 +1540,7 @@ public final class PoolUtils {
 
     /**
      * Decorates a keyed object pool, adding "eroding" behavior. Based on the
-     * configured {@link #factor erosion factor}, objects returning to the pool
+     * configured erosion factor, objects returning to the pool
      * may be invalidated instead of being added to idle capacity.
      */
     private static class ErodingKeyedObjectPool<K, V> implements

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/PooledObjectFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/PooledObjectFactory.java?rev=1566584&r1=1566583&r2=1566584&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/PooledObjectFactory.java
(original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/PooledObjectFactory.java
Mon Feb 10 11:32:16 2014
@@ -58,7 +58,7 @@ package org.apache.commons.pool2;
  * <p>
  * While clients of a {@link KeyedObjectPool} borrow and return instances of
  * the underlying value type {@code V}, the factory methods act on instances of
- * {@link PooledObject PooledObject<V>}.  These are the object wrappers that
+ * {@link PooledObject PooledObject&lt;V&gt;}.  These are the object wrappers that
  * pools use to track and maintain state information about the objects that
  * they manage.
  *

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/AbandonedConfig.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/AbandonedConfig.java?rev=1566584&r1=1566583&r2=1566584&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/AbandonedConfig.java
(original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/AbandonedConfig.java
Mon Feb 10 11:32:16 2014
@@ -44,7 +44,7 @@ public class AbandonedConfig {
      *
      * <p>If set to true, abandoned objects are removed by borrowObject if
      * there are fewer than 2 idle objects available in the pool and
-     * <code>getNumActive() > getMaxTotal() - 3</code> </p>
+     * <code>getNumActive() &gt; getMaxTotal() - 3</code></p>
      *
      * @return true if abandoned objects are to be removed by borrowObject
      */

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java?rev=1566584&r1=1566583&r2=1566584&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
Mon Feb 10 11:32:16 2014
@@ -410,9 +410,9 @@ public abstract class BaseGenericObjectP
      * performed for a run will be the minimum of the configured value and the
      * number of idle instances in the pool. When negative, the number of tests
      * performed will be <code>ceil({@link #getNumIdle}/
-     * abs({@link #getNumTestsPerEvictionRun})) which means that when the value
-     * is <code>-n</code> roughly one nth of the idle objects will be tested
per
-     * run.
+     * abs({@link #getNumTestsPerEvictionRun}))</code> which means that when the
+     * value is <code>-n</code> roughly one nth of the idle objects will be
+     * tested per run.
      *
      * @return max number of objects to examine during each evictor run
      *
@@ -429,9 +429,9 @@ public abstract class BaseGenericObjectP
      * performed for a run will be the minimum of the configured value and the
      * number of idle instances in the pool. When negative, the number of tests
      * performed will be <code>ceil({@link #getNumIdle}/
-     * abs({@link #getNumTestsPerEvictionRun})) which means that when the value
-     * is <code>-n</code> roughly one nth of the idle objects will be tested
per
-     * run.
+     * abs({@link #getNumTestsPerEvictionRun}))</code> which means that when the
+     * value is <code>-n</code> roughly one nth of the idle objects will be
+     * tested per run.
      *
      * @param numTestsPerEvictionRun
      *            max number of objects to examine during each evictor run

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java?rev=1566584&r1=1566583&r2=1566584&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
Mon Feb 10 11:32:16 2014
@@ -326,7 +326,10 @@ public class GenericKeyedObjectPool<K,T>
      * @return object instance from the keyed pool
      *
      * @throws NoSuchElementException if a keyed object instance cannot be
-     *                                returned.
+     *                                returned because the pool is exhausted.
+     *
+     * @throws Exception if a keyed object instance cannot be returned due to an
+     *                   error
      */
     public T borrowObject(K key, long borrowMaxWaitMillis) throws Exception {
         assertOpen();
@@ -1218,6 +1221,9 @@ public class GenericKeyedObjectPool<K,T>
      * {@link #getMinIdlePerKey()} idle instances are created.
      *
      * @param key - The key to register for pool control.
+     *
+     * @throws Exception If the associated factory fails to create the necessary
+     *                   number of idle instances
      */
     public void preparePool(K key) throws Exception {
         int minIdlePerKeySave = getMinIdlePerKey();

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java?rev=1566584&r1=1566583&r2=1566584&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java
Mon Feb 10 11:32:16 2014
@@ -400,6 +400,9 @@ public class GenericObjectPool<T> extend
      * @return object instance from the pool
      *
      * @throws NoSuchElementException if an instance cannot be returned
+     *
+     * @throws Exception if an object instance cannot be returned due to an
+     *                   error
      */
     public T borrowObject(long borrowMaxWaitMillis) throws Exception {
         assertOpen();

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/SoftReferenceObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/SoftReferenceObjectPool.java?rev=1566584&r1=1566583&r2=1566584&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/SoftReferenceObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/SoftReferenceObjectPool.java
Mon Feb 10 11:32:16 2014
@@ -403,7 +403,8 @@ public class SoftReferenceObjectPool<T> 
      * references pools.
      *
      * @param toDestroy PooledSoftReference to destroy
-     * @throws Exception
+     *
+     * @throws Exception If an error occurs while trying to destroy the object
      */
     private void destroy(PooledSoftReference<T> toDestroy) throws Exception {
         toDestroy.invalidate();

Modified: commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/TestBaseObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/TestBaseObjectPool.java?rev=1566584&r1=1566583&r2=1566584&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/TestBaseObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/TestBaseObjectPool.java
Mon Feb 10 11:32:16 2014
@@ -30,7 +30,9 @@ public class TestBaseObjectPool extends 
     private ObjectPool<String> _pool = null;
 
     /**
-     * @param mincapacity
+     * @param mincapacity Ignored by this implemented. Used by sub-classes.
+     *
+     * @return A newly created empty pool
      */
     protected ObjectPool<String> makeEmptyPool(int mincapacity) {
         if (this.getClass() != TestBaseObjectPool.class) {
@@ -48,7 +50,9 @@ public class TestBaseObjectPool extends 
     }
 
     /**
-     * @param n
+     * @param n Ignored by this implemented. Used by sub-classes.
+     *
+     * @return the Nth object (zero indexed)
      */
     protected Object getNthObject(final int n) {
         if (this.getClass() != TestBaseObjectPool.class) {

Modified: commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/TestKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/TestKeyedObjectPool.java?rev=1566584&r1=1566583&r2=1566584&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/TestKeyedObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/TestKeyedObjectPool.java
Mon Feb 10 11:32:16 2014
@@ -39,8 +39,12 @@ public abstract class TestKeyedObjectPoo
      * The pool should be in a default configuration and conform to the expected
      * behaviors described in {@link KeyedObjectPool}.
      * Generally speaking there should be no limits on the various object counts.
+     *
+     * @param factory Factory to use to associate with the pool
+     * @return The newly created empty pool
      */
-    protected abstract KeyedObjectPool<Object,Object> makeEmptyPool(KeyedPooledObjectFactory<Object,Object>
factory);
+    protected abstract KeyedObjectPool<Object,Object> makeEmptyPool(
+            KeyedPooledObjectFactory<Object,Object> factory);
 
     protected static final String KEY = "key";
 
@@ -63,7 +67,9 @@ public abstract class TestKeyedObjectPoo
      * idle and active objects, or
      * throw {@link IllegalArgumentException}
      * if such a pool cannot be created.
-     * @param mincapacity
+     * @param mincapacity Minimum capacity of the pool to create
+     *
+     * @return the newly created keyed object pool
      */
     protected abstract KeyedObjectPool<Object,Object> makeEmptyPool(int mincapacity);
 
@@ -71,8 +77,10 @@ public abstract class TestKeyedObjectPoo
      * Return what we expect to be the n<sup>th</sup>
      * object (zero indexed) created by the pool
      * for the given key.
-     * @param key
-     * @param n
+     * @param key Key for the object to be obtained
+     * @param n   index of the object to be obtained
+     *
+     * @return the requested object
      */
     protected abstract Object getNthObject(Object key, int n);
 

Modified: commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/TestObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/TestObjectPool.java?rev=1566584&r1=1566583&r2=1566584&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/TestObjectPool.java (original)
+++ commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/TestObjectPool.java Mon
Feb 10 11:32:16 2014
@@ -41,7 +41,13 @@ public abstract class TestObjectPool {
      * The pool should be in a default configuration and conform to the expected
      * behaviors described in {@link ObjectPool}.
      * Generally speaking there should be no limits on the various object counts.
-     * @throws UnsupportedOperationException if the pool being tested does not follow pool
contracts.
+     *
+     * @param factory The factory to be used by the object pool
+     *
+     * @return the newly created empty pool
+     *
+     * @throws UnsupportedOperationException if the pool being tested does not
+     *                                       follow pool contracts.
      */
     protected abstract ObjectPool<Object> makeEmptyPool(PooledObjectFactory<Object>
factory) throws UnsupportedOperationException;
 

Modified: commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestAbandonedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestAbandonedObjectPool.java?rev=1566584&r1=1566583&r2=1566584&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestAbandonedObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestAbandonedObjectPool.java
Mon Feb 10 11:32:16 2014
@@ -84,10 +84,11 @@ public class TestAbandonedObjectPool {
     }
 
     /**
-    * Tests fix for Bug 28579, a bug in AbandonedObjectPool that causes numActive to go negative
-    * in GenericObjectPool
-    *
-    */
+     * Tests fix for Bug 28579, a bug in AbandonedObjectPool that causes numActive to go
negative
+     * in GenericObjectPool
+     *
+     * @throws Exception May occur in some failure modes
+     */
     @Test
     public void testConcurrentInvalidation() throws Exception {
         final int POOL_SIZE = 30;
@@ -135,6 +136,8 @@ public class TestAbandonedObjectPool {
      * Verify that an object that gets flagged as abandoned and is subsequently returned
      * is destroyed instead of being returned to the pool (and possibly later destroyed
      * inappropriately).
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test
     public void testAbandonedReturn() throws Exception {
@@ -170,6 +173,8 @@ public class TestAbandonedObjectPool {
     /**
      * Verify that an object that gets flagged as abandoned and is subsequently
      * invalidated is only destroyed (and pool counter decremented) once.
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test
     public void testAbandonedInvalidate() throws Exception {
@@ -199,6 +204,8 @@ public class TestAbandonedObjectPool {
     /**
      * Verify that an object that the evictor identifies as abandoned while it
      * is in process of being returned to the pool is not destroyed.
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test
     public void testRemoveAbandonedWhileReturning() throws Exception {
@@ -232,6 +239,8 @@ public class TestAbandonedObjectPool {
      * further object which should block until the abandoned objects are
      * removed. We don't want the test to block indefinitely when it fails so
      * use maxWait be check we don't actually have to wait that long.
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test
     public void testWhenExhaustedBlock() throws Exception {

Modified: commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java?rev=1566584&r1=1566583&r2=1566584&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java
Mon Feb 10 11:32:16 2014
@@ -508,9 +508,15 @@ public class TestGenericKeyedObjectPool 
     }
 
     /**
-     * Kicks off <numThreads> test threads, each of which will go through
-     * <iterations> borrow-return cycles with random delay times <= delay
-     * in between.
+     * Kicks off <code>numThreads</code> test threads, each of which will go
+     * through <code>iterations</code> borrow-return cycles with random delay
+     * times &lt;= delay in between.
+     *
+     * @param <T>           Type of object in pool
+     * @param numThreads    Number of test threads
+     * @param iterations    Number of iterations for each thread
+     * @param delay         Maximum delay between iterations
+     * @param gkopPool      The keyed object pool to use
      */
     public <T> void runTestThreads(int numThreads, int iterations, int delay, GenericKeyedObjectPool<String,T>
gkopPool) {
         ArrayList<TestThread<T>> threads = new ArrayList<TestThread<T>>();
@@ -547,6 +553,8 @@ public class TestGenericKeyedObjectPool 
      * Verifies that maxTotal is not exceeded when factory destroyObject
      * has high latency, testOnReturn is set and there is high incidence of
      * validation failures.
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test(timeout=60000)
     public void testMaxTotalInvariant() throws Exception {
@@ -718,6 +726,8 @@ public class TestGenericKeyedObjectPool 
      * regardless of FIFO/LIFO
      *
      * JIRA: POOL-86
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test(timeout=60000)
     public void testEvictionOrder() throws Exception {
@@ -842,6 +852,8 @@ public class TestGenericKeyedObjectPool 
     /**
      * Verifies that the evictor visits objects in expected order
      * and frequency.
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test(timeout=60000)
     public void testEvictorVisiting() throws Exception {
@@ -1275,6 +1287,8 @@ public class TestGenericKeyedObjectPool 
 
     /**
      * Test case for POOL-180.
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test(timeout=200000)
     public void testMaxActivePerKeyExceeded() throws Exception {
@@ -1294,6 +1308,8 @@ public class TestGenericKeyedObjectPool 
 
     /**
      * Test to make sure that clearOldest does not destroy instances that have been checked
out.
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test(timeout=60000)
     public void testClearOldest() throws Exception {
@@ -1330,6 +1346,8 @@ public class TestGenericKeyedObjectPool 
     /**
      * Verifies that threads that get parked waiting for keys not in use
      * when the pool is at maxTotal eventually get served.
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test(timeout=60000)
     public void testLivenessPerKey() throws Exception {
@@ -1354,6 +1372,8 @@ public class TestGenericKeyedObjectPool 
     /**
      * POOL-192
      * Verify that clear(key) does not leak capacity.
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test(timeout=60000)
     public void testClear() throws Exception {
@@ -1380,6 +1400,8 @@ public class TestGenericKeyedObjectPool 
 
     /**
      * POOL-189
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test(timeout=60000)
     public void testWhenExhaustedBlockClosePool() throws Exception {
@@ -1410,6 +1432,8 @@ public class TestGenericKeyedObjectPool 
     /**
      * POOL-231 - verify that concurrent invalidates of the same object do not
      * corrupt pool destroyCount.
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test
     public void testConcurrentInvalidate() throws Exception {
@@ -1784,6 +1808,8 @@ public class TestGenericKeyedObjectPool 
      * is invalidated.
      *
      * JIRA: POOL-240
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test
     public void testInvalidateWaiting()
@@ -1863,6 +1889,8 @@ public class TestGenericKeyedObjectPool 
      * invalidated.
      *
      * JIRA: POOL-240
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test
     public void testInvalidateFreesCapacity()
@@ -1893,6 +1921,8 @@ public class TestGenericKeyedObjectPool 
      * validation.
      *
      * JIRA: POOL-240
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test
     public void testValidationFailureOnReturnFreesCapacity()
@@ -1921,6 +1951,8 @@ public class TestGenericKeyedObjectPool 
      * Verify that factory exceptions creating objects do not corrupt per key create count.
      *
      * JIRA: POOL-243
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test
     public void testMakeObjectException()

Modified: commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java?rev=1566584&r1=1566583&r2=1566584&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java
Mon Feb 10 11:32:16 2014
@@ -276,7 +276,9 @@ public class TestGenericObjectPool exten
 
     /**
      * Tests addObject contention between ensureMinIdle triggered by
-     * the Evictor with minIdle > 0 and borrowObject.
+     * the Evictor with minIdle &gt; 0 and borrowObject.
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test(timeout=60000)
     public void testEvictAddObjects() throws Exception {
@@ -335,6 +337,8 @@ public class TestGenericObjectPool exten
      * regardless of FIFO/LIFO.
      *
      * JIRA: POOL-86
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test(timeout=60000)
     public void testEvictionOrder() throws Exception {
@@ -386,6 +390,8 @@ public class TestGenericObjectPool exten
     /**
      * Verifies that the evictor visits objects in expected order
      * and frequency.
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test
     public void testEvictorVisiting() throws Exception {
@@ -1145,6 +1151,8 @@ public class TestGenericObjectPool exten
     /**
      * POOL-231 - verify that concurrent invalidates of the same object do not
      * corrupt pool destroyCount.
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test
     public void testConcurrentInvalidate() throws Exception {
@@ -1340,6 +1348,8 @@ public class TestGenericObjectPool exten
      * Verifies that maxTotal is not exceeded when factory destroyObject
      * has high latency, testOnReturn is set and there is high incidence of
      * validation failures.
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test(timeout=60000)
     public void testMaxTotalInvariant() throws Exception {
@@ -1384,6 +1394,8 @@ public class TestGenericObjectPool exten
 
     /**
      * POOL-189
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test(timeout=60000)
     public void testWhenExhaustedBlockClosePool() throws Exception {
@@ -1972,6 +1984,8 @@ public class TestGenericObjectPool exten
      *   Thread 2 starts to borrow another instance before thread 1 returns its instance
      *   Thread 1 returns its instance while thread 2 is validating its newly created instance
      * The test verifies that the instance created by Thread 2 is not leaked.
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test(timeout=60000)
     public void testMakeConcurrentWithReturn() throws Exception {
@@ -2018,6 +2032,8 @@ public class TestGenericObjectPool exten
      * invalidated.
      *
      * JIRA: POOL-240
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test
     public void testInvalidateFreesCapacity()
@@ -2048,6 +2064,8 @@ public class TestGenericObjectPool exten
      * validation.
      *
      * JIRA: POOL-240
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test
     public void testValidationFailureOnReturnFreesCapacity()

Modified: commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestSoftRefOutOfMemory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestSoftRefOutOfMemory.java?rev=1566584&r1=1566583&r2=1566584&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestSoftRefOutOfMemory.java
(original)
+++ commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestSoftRefOutOfMemory.java
Mon Feb 10 11:32:16 2014
@@ -159,6 +159,8 @@ public class TestSoftRefOutOfMemory {
 
     /**
      * Makes sure an {@link OutOfMemoryError} isn't swallowed.
+     *
+     * @throws Exception May occur in some failure modes
      */
     @Test
     public void testOutOfMemoryError() throws Exception {



Mime
View raw message