You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Jacopo Cappellato (JIRA)" <ji...@apache.org> on 2014/10/05 08:00:41 UTC

[jira] [Created] (POOL-279) Thread concurrency issue in DefaultPooledObject.getIdleTimeMillis()

Jacopo Cappellato created POOL-279:
--------------------------------------

             Summary: Thread concurrency issue in DefaultPooledObject.getIdleTimeMillis()
                 Key: POOL-279
                 URL: https://issues.apache.org/jira/browse/POOL-279
             Project: Commons Pool
          Issue Type: Bug
    Affects Versions: 2.0
            Reporter: Jacopo Cappellato
            Priority: Minor


Under unlucky thread concurrency the getIdleTimeMillis() method of DefaultPooledObject can return a negative value.
I have attached a Junit test that fails most of the times and a simple fix, that doesn't use synchronization: with this fix the Junit test always succeed.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)