commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1213730 - /commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/PooledObject.java
Date Tue, 13 Dec 2011 15:11:14 GMT
Author: markt
Date: Tue Dec 13 15:11:13 2011
New Revision: 1213730

URL: http://svn.apache.org/viewvc?rev=1213730&view=rev
Log:
Fix POOL-197. More consistent init of timing attributes.

Modified:
    commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/PooledObject.java

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/PooledObject.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/PooledObject.java?rev=1213730&r1=1213729&r2=1213730&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/PooledObject.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/PooledObject.java Tue
Dec 13 15:11:13 2011
@@ -26,8 +26,8 @@ public class PooledObject<T> implements 
     private T object = null;
     private volatile PooledObjectState state = PooledObjectState.IDLE; // @GuardedBy("this")
to ensure transitions are valid
     private final long createTime = System.currentTimeMillis();
-    private long lastBorrowTime = System.currentTimeMillis();
-    private long lastReturnTime = System.currentTimeMillis();
+    private long lastBorrowTime = createTime;
+    private long lastReturnTime = createTime;
 
     public PooledObject(T object) {
         this.object = object;



Mime
View raw message