commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (POOL-196) PooledObject.getActiveTimeMillis() does not synch. access to lastReturnTime and lastBorrowTime
Date Tue, 13 Dec 2011 01:11:31 GMT
PooledObject.getActiveTimeMillis() does not synch. access to lastReturnTime and lastBorrowTime
----------------------------------------------------------------------------------------------

                 Key: POOL-196
                 URL: https://issues.apache.org/jira/browse/POOL-196
             Project: Commons Pool
          Issue Type: Bug
            Reporter: Sebb


The method PooledObject.getActiveTimeMillis() compares lastReturnTime and lastBorrowTime,
but is not synchronised; nor are the variables volatile.

There are two possible thread issues here: safe publication of the variables, and possible
window error when comparing the values.

The method needs to be synch. and the fields need to be volatile (or the getters need to be
synch.)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message