This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch POOL_2_X in repository https://gitbox.apache.org/repos/asf/commons-pool.git
commit fffc1897d9ac4df61c9510afaaf8f978d8ede56c Author: Mark Thomas <ma...@apache.org> AuthorDate: Tue Oct 3 12:51:25 2023 +0100 Remove trailing space --- .../org/apache/commons/pool2/BaseObjectPool.java | 1 - .../org/apache/commons/pool2/KeyedObjectPool.java | 2 +- .../java/org/apache/commons/pool2/PoolUtils.java | 30 +++++++++++----------- .../commons/pool2/impl/GenericKeyedObjectPool.java | 4 +-- .../commons/pool2/impl/GenericObjectPool.java | 2 +- 5 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/main/java/org/apache/commons/pool2/BaseObjectPool.java b/src/main/java/org/apache/commons/pool2/BaseObjectPool.java index 3d1dfbf0..613085c9 100644 --- a/src/main/java/org/apache/commons/pool2/BaseObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/BaseObjectPool.java @@ -25,7 +25,6 @@ package org.apache.commons.pool2; * </p> * * @param <T> Type of element pooled in this pool. - * * * @since 2.0 */ diff --git a/src/main/java/org/apache/commons/pool2/KeyedObjectPool.java b/src/main/java/org/apache/commons/pool2/KeyedObjectPool.java index 27317ff9..3de59b4f 100644 --- a/src/main/java/org/apache/commons/pool2/KeyedObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/KeyedObjectPool.java @@ -61,7 +61,7 @@ import java.util.NoSuchElementException; * * @param <K> The type of keys maintained by this pool. * @param <V> Type of element pooled in this pool. - * + * * * @see KeyedPooledObjectFactory * @see ObjectPool diff --git a/src/main/java/org/apache/commons/pool2/PoolUtils.java b/src/main/java/org/apache/commons/pool2/PoolUtils.java index 4c713f85..7119d7e8 100644 --- a/src/main/java/org/apache/commons/pool2/PoolUtils.java +++ b/src/main/java/org/apache/commons/pool2/PoolUtils.java @@ -327,7 +327,7 @@ public final class PoolUtils { * may be invalidated instead of being added to idle capacity. * * @param <T> type of objects in the pool - * + * */ private static class ErodingObjectPool<T> implements ObjectPool<T> { @@ -598,7 +598,7 @@ public final class PoolUtils { * as the pool's minIdle setting. * * @param <T> type of objects in the pool - * + * */ private static final class ObjectPoolMinIdleTimerTask<T> extends TimerTask { @@ -1023,7 +1023,7 @@ public final class PoolUtils { * </p> * * @param <T> type of objects in the pool - * + * */ private static final class SynchronizedObjectPool<T> implements ObjectPool<T> { @@ -1337,7 +1337,7 @@ public final class PoolUtils { * keyedPool, see {@link Timer#schedule(TimerTask, long, long)}. * @param <K> the type of the pool key * @param <V> the type of pool entries - * + * * @return a {@link Map} of key and {@link TimerTask} pairs that will * periodically check the pools idle object count. * @throws IllegalArgumentException @@ -1382,7 +1382,7 @@ public final class PoolUtils { * keyedPool, see {@link Timer#schedule(TimerTask, long, long)}. * @param <K> the type of the pool key * @param <V> the type of pool entries - * + * * @return the {@link TimerTask} that will periodically check the pools idle * object count. * @throws IllegalArgumentException @@ -1423,7 +1423,7 @@ public final class PoolUtils { * the frequency in milliseconds to check the number of idle objects in a pool, * see {@link Timer#schedule(TimerTask, long, long)}. * @param <T> the type of objects in the pool - * + * * @return the {@link TimerTask} that will periodically check the pools idle * object count. * @throws IllegalArgumentException @@ -1480,7 +1480,7 @@ public final class PoolUtils { * count when possible. * @param <K> the type of the pool key * @param <V> the type of pool entries - * + * * @throws IllegalArgumentException * when {@code keyedPool} is {@code null}. * @return a pool that adaptively decreases its size when idle objects are @@ -1515,7 +1515,7 @@ public final class PoolUtils { * shrinks less aggressively. * @param <K> the type of the pool key * @param <V> the type of pool entries - * + * * @throws IllegalArgumentException * when {@code keyedPool} is {@code null} or when {@code factor} * is not positive. @@ -1558,7 +1558,7 @@ public final class PoolUtils { * when true, each key is treated independently. * @param <K> the type of the pool key * @param <V> the type of pool entries - * + * * @throws IllegalArgumentException * when {@code keyedPool} is {@code null} or when {@code factor} * is not positive. @@ -1593,7 +1593,7 @@ public final class PoolUtils { * the ObjectPool to be decorated so it shrinks its idle count * when possible. * @param <T> the type of objects in the pool - * + * * @throws IllegalArgumentException * when {@code pool} is {@code null}. * @return a pool that adaptively decreases its size when idle objects are @@ -1626,7 +1626,7 @@ public final class PoolUtils { * shrinks more aggressively. If 1 < factor then the pool * shrinks less aggressively. * @param <T> the type of objects in the pool - * + * * @throws IllegalArgumentException * when {@code pool} is {@code null} or when {@code factor} is * not positive. @@ -1667,7 +1667,7 @@ public final class PoolUtils { * the number of idle objects to add for each {@code key}. * @param <K> the type of the pool key * @param <V> the type of pool entries - * + * * @throws Exception * when {@link KeyedObjectPool#addObject(Object)} fails. * @throws IllegalArgumentException @@ -1698,7 +1698,7 @@ public final class PoolUtils { * the number of idle objects to add for {@code key}. * @param <K> the type of the pool key * @param <V> the type of pool entries - * + * * @throws Exception * when {@link KeyedObjectPool#addObject(Object)} fails. * @throws IllegalArgumentException @@ -1724,7 +1724,7 @@ public final class PoolUtils { * @param count * the number of idle objects to add. * @param <T> the type of objects in the pool - * + * * @throws Exception * when {@link ObjectPool#addObject()} fails. * @throws IllegalArgumentException @@ -1773,7 +1773,7 @@ public final class PoolUtils { * KeyedObjectPool. * @param <K> the type of the pool key * @param <V> the type of pool entries - * + * * @return a synchronized view of the specified KeyedObjectPool. */ public static <K, V> KeyedObjectPool<K, V> synchronizedPool(final KeyedObjectPool<K, V> keyedPool) { diff --git a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java index dad106cb..18f82566 100644 --- a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java @@ -1363,7 +1363,7 @@ public class GenericKeyedObjectPool<K, T> extends BaseGenericObjectPool<T> */ @Override public Map<String, List<DefaultPooledObjectInfo>> listAllObjects() { - return poolMap.entrySet().stream().collect(Collectors.toMap(e -> e.getKey().toString(), + return poolMap.entrySet().stream().collect(Collectors.toMap(e -> e.getKey().toString(), e -> e.getValue().getAllObjects().values().stream().map(DefaultPooledObjectInfo::new).collect(Collectors.toList()))); } @@ -1406,7 +1406,7 @@ public class GenericKeyedObjectPool<K, T> extends BaseGenericObjectPool<T> lock.unlock(); lock = keyLock.writeLock(); lock.lock(); - final AtomicBoolean allocated = new AtomicBoolean(); + final AtomicBoolean allocated = new AtomicBoolean(); objectDeque = poolMap.computeIfAbsent(k, key -> { allocated.set(true); final ObjectDeque<T> deque = new ObjectDeque<>(fairness); diff --git a/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java index cff98204..630cfddd 100644 --- a/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java @@ -211,7 +211,7 @@ public class GenericObjectPool<T> extends BaseGenericObjectPool<T> * is thrown. If there is no factory set (factory == null), an {@code IllegalStateException} * is thrown. * </p> - * + * */ @Override public void addObject() throws Exception {