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 2024/11/23 04:00:34 UTC

(commons-dbcp) 04/09: Javadoc

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-dbcp.git

commit 28ef1403c774facd715d4e5c8cee238f0276aebb
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Nov 22 17:54:49 2024 -0500

    Javadoc
---
 src/main/java/org/apache/commons/dbcp2/Utils.java | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/main/java/org/apache/commons/dbcp2/Utils.java b/src/main/java/org/apache/commons/dbcp2/Utils.java
index 16f23a2f..3020f893 100644
--- a/src/main/java/org/apache/commons/dbcp2/Utils.java
+++ b/src/main/java/org/apache/commons/dbcp2/Utils.java
@@ -274,6 +274,13 @@ public final class Utils {
         return value == null ? null : String.valueOf(value);
     }
 
+    /**
+     * Throws a LifetimeExceededException if the given pooled object's lifetime has exceeded a maximum duration.
+     *
+     * @param p           The pooled object to test.
+     * @param maxDuration The maximum lifetime.
+     * @throws LifetimeExceededException Thrown if the given pooled object's lifetime has exceeded a maximum duration.
+     */
     public static void validateLifetime(final PooledObject<?> p, final Duration maxDuration) throws LifetimeExceededException {
         if (maxDuration.compareTo(Duration.ZERO) > 0) {
             final Duration lifetimeDuration = Duration.between(p.getCreateInstant(), Instant.now());