commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (Created) (JIRA)" <>
Subject [jira] [Created] (POOL-197) PooledObject: risky init of lastBorrowTime & lastReturnTime
Date Tue, 13 Dec 2011 01:21:30 GMT
PooledObject: risky init of lastBorrowTime & lastReturnTime

                 Key: POOL-197
             Project: Commons Pool
          Issue Type: Bug
            Reporter: Sebb

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.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message