You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/03/04 20:11:23 UTC
[commons-pool] branch master updated: Format tweak
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-pool.git
The following commit(s) were added to refs/heads/master by this push:
new d867555b Format tweak
d867555b is described below
commit d867555b24ca1ece0e1824f3a89b59aea6c567a4
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Mar 4 15:11:19 2023 -0500
Format tweak
---
.../java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
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 206e5196..0697ef83 100644
--- a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
+++ b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
@@ -597,6 +597,7 @@ public class GenericKeyedObjectPool<K, T, E extends Exception> extends BaseGener
* If reuseCapacity is true and there are clients waiting to
* borrow objects, this method will attempt to reuse the capacity freed
* by this operation, adding instances to the most loaded keyed pools.
+ * </p>
*
* @param key the key to clear
* @param reuseCapacity whether or not to reuse freed capacity
@@ -605,11 +606,8 @@ public class GenericKeyedObjectPool<K, T, E extends Exception> extends BaseGener
final ObjectDeque<T> objectDeque = register(key);
int freedCapacity = 0;
try {
- final LinkedBlockingDeque<PooledObject<T>> idleObjects =
- objectDeque.getIdleObjects();
-
+ final LinkedBlockingDeque<PooledObject<T>> idleObjects = objectDeque.getIdleObjects();
PooledObject<T> p = idleObjects.poll();
-
while (p != null) {
try {
if (destroy(key, p, true, DestroyMode.NORMAL)) {
@@ -626,7 +624,6 @@ public class GenericKeyedObjectPool<K, T, E extends Exception> extends BaseGener
if (reuseCapacity) {
reuseCapacity(freedCapacity);
}
-
}
/**