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 2015b2f [POOL-395] Improve exception thrown in
GenericObjectPool.borrowObject when pool is exhausted. Added
BaseGenericObjectPool.setMessagesStatistics(boolean).
2015b2f is described below
commit 2015b2fd9cea98053fd5b65da94907e4b68a8042
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Jun 27 12:55:54 2021 -0400
[POOL-395] Improve exception thrown in GenericObjectPool.borrowObject
when pool is exhausted. Added
BaseGenericObjectPool.setMessagesStatistics(boolean).
Javadoc.
---
.../apache/commons/pool2/impl/BaseGenericObjectPool.java | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git
a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
index 544d3de..e743d21 100644
--- a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
+++ b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
@@ -411,7 +411,11 @@ public abstract class BaseGenericObjectPool<T> extends
BaseObject {
/**
* Appends statistics if enabled.
- *
+ * <p>
+ * Statistics may not accurately reflect snapshot state at the time of the
exception because we do not want to lock the pool when gathering this
+ * information.
+ * </p>
+ *
* @param string The root string.
* @return The root string plus statistics.
*/
@@ -705,6 +709,10 @@ public abstract class BaseGenericObjectPool<T> extends
BaseObject {
/**
* Gets whether to include statistics in exception messages.
+ * <p>
+ * Statistics may not accurately reflect snapshot state at the time of the
exception because we do not want to lock the pool when gathering this
+ * information.
+ * </p>
*
* @return whether to include statistics in exception messages.
* @since 2.11.0
@@ -1276,7 +1284,11 @@ public abstract class BaseGenericObjectPool<T> extends
BaseObject {
/**
* Sets whether to include statistics in exception messages.
- *
+ * <p>
+ * Statistics may not accurately reflect snapshot state at the time of the
exception because we do not want to lock the pool when gathering this
+ * information.
+ * </p>
+ *
* @param messagesDetails whether to include statistics in exception
messages.
* @since 2.11.0
*/