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 f154e5d  Add comment from previous version.
f154e5d is described below

commit f154e5d47a43f104c930c184c8c6a3753e543753
Author: Gary Gregory <[email protected]>
AuthorDate: Fri Aug 13 09:56:35 2021 -0400

    Add comment from previous version.
---
 src/main/java/org/apache/commons/pool2/PooledObject.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/main/java/org/apache/commons/pool2/PooledObject.java 
b/src/main/java/org/apache/commons/pool2/PooledObject.java
index 83ac35c..ae55dad 100644
--- a/src/main/java/org/apache/commons/pool2/PooledObject.java
+++ b/src/main/java/org/apache/commons/pool2/PooledObject.java
@@ -84,6 +84,7 @@ public interface PooledObject<T> extends 
Comparable<PooledObject<T>> {
      * @since 2.11.0
      */
     default Duration getActiveDuration() {
+        // Take copies to avoid threading issues
         final Instant lastReturnInstant = getLastReturnInstant();
         final Instant lastBorrowInstant = getLastBorrowInstant();
         // @formatter:off

Reply via email to