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 b67083c Javadoc tweaks. Format nits.
b67083c is described below
commit b67083c35780bd8b6764cf3ecd600d194f6898cd
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Jun 3 16:18:35 2021 -0400
Javadoc tweaks. Format nits.
---
.../pool2/impl/DefaultPooledObjectInfoMBean.java | 25 +++++++++++-----------
.../pool2/impl/SecurityManagerCallStack.java | 7 ++++--
.../commons/pool2/impl/ThrowableCallStack.java | 3 ++-
3 files changed, 20 insertions(+), 15 deletions(-)
diff --git
a/src/main/java/org/apache/commons/pool2/impl/DefaultPooledObjectInfoMBean.java
b/src/main/java/org/apache/commons/pool2/impl/DefaultPooledObjectInfoMBean.java
index 393ae73..f7c33e4 100644
---
a/src/main/java/org/apache/commons/pool2/impl/DefaultPooledObjectInfoMBean.java
+++
b/src/main/java/org/apache/commons/pool2/impl/DefaultPooledObjectInfoMBean.java
@@ -19,26 +19,28 @@ package org.apache.commons.pool2.impl;
/**
* The interface that defines the information about pooled objects that will be
* exposed via JMX.
- *
+ * <p>
* NOTE: This interface exists only to define those attributes and methods that
* will be made available via JMX. It must not be implemented by clients
* as it is subject to change between major, minor and patch version
* releases of commons pool. Clients that implement this interface may
* not, therefore, be able to upgrade to a new minor or patch release
* without requiring code changes.
+ * </p>
*
* @since 2.0
*/
public interface DefaultPooledObjectInfoMBean {
+
/**
- * Get the number of times this object has been borrowed.
+ * Gets the number of times this object has been borrowed.
* @return The number of times this object has been borrowed.
* @since 2.1
*/
long getBorrowedCount();
/**
- * Obtain the time (using the same basis as
+ * Gets the time (using the same basis as
* {@link System#currentTimeMillis()}) that pooled object was created.
*
* @return The creation time for the pooled object
@@ -46,7 +48,7 @@ public interface DefaultPooledObjectInfoMBean {
long getCreateTime();
/**
- * Obtain the time that pooled object was created.
+ * Gets the time that pooled object was created.
*
* @return The creation time for the pooled object formatted as
* {@code yyyy-MM-dd HH:mm:ss Z}
@@ -54,7 +56,7 @@ public interface DefaultPooledObjectInfoMBean {
String getCreateTimeFormatted();
/**
- * Obtain the time (using the same basis as
+ * Gets the time (using the same basis as
* {@link System#currentTimeMillis()}) the polled object was last borrowed.
*
* @return The time the pooled object was last borrowed
@@ -62,16 +64,15 @@ public interface DefaultPooledObjectInfoMBean {
long getLastBorrowTime();
/**
- * Obtain the time that pooled object was last borrowed.
+ * Gets the time that pooled object was last borrowed.
*
* @return The last borrowed time for the pooled object formatted as
* {@code yyyy-MM-dd HH:mm:ss Z}
*/
String getLastBorrowTimeFormatted();
-
/**
- * Obtain the stack trace recorded when the pooled object was last
borrowed.
+ * Gets the stack trace recorded when the pooled object was last borrowed.
*
* @return The stack trace showing which code last borrowed the pooled
* object
@@ -79,7 +80,7 @@ public interface DefaultPooledObjectInfoMBean {
String getLastBorrowTrace();
/**
- * Obtain the time (using the same basis as
+ * Gets the time (using the same basis as
* {@link System#currentTimeMillis()})the wrapped object was last returned.
*
* @return The time the object was last returned
@@ -87,7 +88,7 @@ public interface DefaultPooledObjectInfoMBean {
long getLastReturnTime();
/**
- * Obtain the time that pooled object was last returned.
+ * Gets the time that pooled object was last returned.
*
* @return The last returned time for the pooled object formatted as
* {@code yyyy-MM-dd HH:mm:ss Z}
@@ -95,7 +96,7 @@ public interface DefaultPooledObjectInfoMBean {
String getLastReturnTimeFormatted();
/**
- * Provides a String form of the wrapper for debug purposes. The format is
+ * Gets a String form of the wrapper for debug purposes. The format is
* not fixed and may change at any time.
*
* @return A string representation of the pooled object
@@ -105,7 +106,7 @@ public interface DefaultPooledObjectInfoMBean {
String getPooledObjectToString();
/**
- * Obtain the name of the class of the pooled object.
+ * Gets the name of the class of the pooled object.
*
* @return The pooled object's class name
*
diff --git
a/src/main/java/org/apache/commons/pool2/impl/SecurityManagerCallStack.java
b/src/main/java/org/apache/commons/pool2/impl/SecurityManagerCallStack.java
index a47bb90..27af175 100644
--- a/src/main/java/org/apache/commons/pool2/impl/SecurityManagerCallStack.java
+++ b/src/main/java/org/apache/commons/pool2/impl/SecurityManagerCallStack.java
@@ -40,8 +40,9 @@ public class SecurityManagerCallStack implements CallStack {
* A custom security manager.
*/
private static class PrivateSecurityManager extends SecurityManager {
+
/**
- * Get the class stack.
+ * Gets the class stack.
*
* @return class stack
*/
@@ -54,6 +55,7 @@ public class SecurityManagerCallStack implements CallStack {
return stack;
}
}
+
/**
* A snapshot of a class stack.
*/
@@ -70,6 +72,7 @@ public class SecurityManagerCallStack implements CallStack {
this.stack = stack;
}
}
+
private final String messageFormat;
//@GuardedBy("dateFormat")
@@ -80,7 +83,7 @@ public class SecurityManagerCallStack implements CallStack {
private volatile Snapshot snapshot;
/**
- * Create a new instance.
+ * Creates a new instance.
*
* @param messageFormat message format
* @param useTimestamp whether to format the dates in the output message
or not
diff --git
a/src/main/java/org/apache/commons/pool2/impl/ThrowableCallStack.java
b/src/main/java/org/apache/commons/pool2/impl/ThrowableCallStack.java
index 7219038..b220ab3 100644
--- a/src/main/java/org/apache/commons/pool2/impl/ThrowableCallStack.java
+++ b/src/main/java/org/apache/commons/pool2/impl/ThrowableCallStack.java
@@ -37,6 +37,7 @@ public class ThrowableCallStack implements CallStack {
private static final long serialVersionUID = 1L;
private final long timestampMillis = System.currentTimeMillis();
}
+
private final String messageFormat;
//@GuardedBy("dateFormat")
@@ -45,7 +46,7 @@ public class ThrowableCallStack implements CallStack {
private volatile Snapshot snapshot;
/**
- * Create a new instance.
+ * Creates a new instance.
*
* @param messageFormat message format
* @param useTimestamp whether to format the dates in the output message
or not