This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch POOL_2_X in repository https://gitbox.apache.org/repos/asf/commons-pool.git
commit acb5dfbdc3455d2fab4f906b65698cb6e75f21c4 Author: Gary Gregory <[email protected]> AuthorDate: Sun Jan 4 15:21:13 2026 -0500 Javadoc Add an empty line before a Javadoc comment --- src/main/java/org/apache/commons/pool2/PoolUtils.java | 4 ++++ .../java/org/apache/commons/pool2/impl/LinkedBlockingDeque.java | 2 ++ .../org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java | 8 ++++++++ .../java/org/apache/commons/pool2/impl/TestGenericObjectPool.java | 7 +++++++ .../commons/pool2/impl/TestSynchronizedPooledObjectFactory.java | 2 ++ 5 files changed, 23 insertions(+) diff --git a/src/main/java/org/apache/commons/pool2/PoolUtils.java b/src/main/java/org/apache/commons/pool2/PoolUtils.java index 303f8e3f..9ee89420 100644 --- a/src/main/java/org/apache/commons/pool2/PoolUtils.java +++ b/src/main/java/org/apache/commons/pool2/PoolUtils.java @@ -110,6 +110,7 @@ public final class PoolUtils { } } } + /** * Decorates a keyed object pool, adding "eroding" behavior. Based on the * configured erosion factor, objects returning to the pool @@ -469,6 +470,7 @@ public final class PoolUtils { pool + '}'; } } + /** * Extends ErodingKeyedObjectPool to allow erosion to take place on a * per-key basis. Timing of erosion events is tracked separately for @@ -519,6 +521,7 @@ public final class PoolUtils { ", keyedPool=" + getKeyedPool() + '}'; } } + /** * Timer task that adds objects to the pool until the number of idle * instances for the given key reaches the configured minIdle. Note that @@ -598,6 +601,7 @@ public final class PoolUtils { return sb.toString(); } } + /** * Timer task that adds objects to the pool until the number of idle * instances reaches the configured minIdle. Note that this is not the same diff --git a/src/main/java/org/apache/commons/pool2/impl/LinkedBlockingDeque.java b/src/main/java/org/apache/commons/pool2/impl/LinkedBlockingDeque.java index f8c87ace..80d03975 100644 --- a/src/main/java/org/apache/commons/pool2/impl/LinkedBlockingDeque.java +++ b/src/main/java/org/apache/commons/pool2/impl/LinkedBlockingDeque.java @@ -98,6 +98,7 @@ final class LinkedBlockingDeque<E> extends AbstractQueue<E> * Base class for Iterators for LinkedBlockingDeque */ private abstract class AbstractItr implements Iterator<E> { + /** * The next node to return in next() */ @@ -252,6 +253,7 @@ final class LinkedBlockingDeque<E> extends AbstractQueue<E> * @param <E> node item type */ private static final class Node<E> { + /** * The item, or null if this node has been removed. */ diff --git a/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java b/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java index 0c237687..bc2ec41f 100644 --- a/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java +++ b/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java @@ -351,18 +351,25 @@ public class TestGenericKeyedObjectPool extends AbstractTestKeyedObjectPool { private static class TestThread<T> implements Runnable { private final Random random = new Random(); + /** GKOP to hit */ private final KeyedObjectPool<String, T> pool; + /** Number of borrow/return iterations */ private final int iter; + /** Delay before borrow */ private final int startDelay; + /** Delay before return */ private final int holdTime; + /** Whether or not delays are random (with max = configured values) */ private final boolean randomDelay; + /** Expected object */ private final T expectedObject; + /** Key used in borrow / return sequence - null means random */ private final String key; private volatile boolean complete; @@ -482,6 +489,7 @@ public class TestGenericKeyedObjectPool extends AbstractTestKeyedObjectPool { // @see https://issues.apache.org/jira/browse/SUREFIRE-121 /** SetUp(): {@code new GenericKeyedObjectPool<String,String>(factory)} */ private GenericKeyedObjectPool<String, String> gkoPool; + /** SetUp(): {@code new SimpleFactory<String>()} */ private SimpleFactory<String> simpleFactory; diff --git a/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java b/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java index 0f88977a..4e7f90e8 100644 --- a/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java +++ b/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java @@ -445,18 +445,25 @@ class TestGenericObjectPool extends TestBaseObjectPool { } private static class TestThread<T> implements Runnable { + /** Source of random delay times */ private final Random random; + /** Pool to borrow from */ private final ObjectPool<T> pool; + /** Number of borrow attempts */ private final int iter; + /** Delay before each borrow attempt */ private final int startDelay; + /** Time to hold each borrowed object before returning it */ private final int holdTime; + /** Whether or not start and hold time are randomly generated */ private final boolean randomDelay; + /** Object expected to be borrowed (fail otherwise) */ private final Object expectedObject; private volatile boolean complete; diff --git a/src/test/java/org/apache/commons/pool2/impl/TestSynchronizedPooledObjectFactory.java b/src/test/java/org/apache/commons/pool2/impl/TestSynchronizedPooledObjectFactory.java index a838638a..d924cd55 100644 --- a/src/test/java/org/apache/commons/pool2/impl/TestSynchronizedPooledObjectFactory.java +++ b/src/test/java/org/apache/commons/pool2/impl/TestSynchronizedPooledObjectFactory.java @@ -34,8 +34,10 @@ import org.apache.commons.pool2.PooledObjectFactory; * @param <T> Type of element managed in this factory. */ final class TestSynchronizedPooledObjectFactory<T> implements PooledObjectFactory<T> { + /** Synchronization lock */ private final WriteLock writeLock = new ReentrantReadWriteLock().writeLock(); + /** Wrapped factory */ private final PooledObjectFactory<T> factory;
