You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ps...@apache.org on 2015/02/01 17:53:50 UTC
svn commit: r1656329 -
/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java
Author: psteitz
Date: Sun Feb 1 16:53:49 2015
New Revision: 1656329
URL: http://svn.apache.org/r1656329
Log:
Clarified addObject contract - no-op if there is no capacity in the pool.
Modified:
commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java
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=1656329&r1=1656328&r2=1656329&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 Sun Feb 1 16:53:49 2015
@@ -940,6 +940,9 @@ public class GenericObjectPool<T> extend
/**
* Create an object, and place it into the pool. addObject() is useful for
* "pre-loading" a pool with idle objects.
+ * <p>
+ * If there is no capacity available to add to the pool, this is a no-op
+ * (no exception, no impact to the pool). </p>
*/
@Override
public void addObject() throws Exception {
@@ -954,7 +957,8 @@ public class GenericObjectPool<T> extend
/**
* Add the provided wrapped pooled object to the set of idle objects for
- * this pool. The object must already be part of the pool.
+ * this pool. The object must already be part of the pool. If {@code p}
+ * is null, this is a no-op (no exception, but no impact on the pool).
*
* @param p The object to make idle
*