Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
PooledObject inits lastBorrowTime & lastReturnTime (and createTime) using System.currentTimeMillis().
As well as being wasteful to call the System method 3 times, it's possible that the clock will change between invocations.
This could result in getActiveTimeMillis() returning non-zero active time even though the object has never been used.
Should probably init lastBorrowTime & lastReturnTime from createTime.