You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Mark Thomas (JIRA)" <ji...@apache.org> on 2014/02/21 17:14:19 UTC

[jira] [Updated] (POOL-221) PooledObject.state does not need to be volatile

     [ https://issues.apache.org/jira/browse/POOL-221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Thomas updated POOL-221:
-----------------------------

    Fix Version/s: 2.0

> PooledObject.state does not need to be volatile
> -----------------------------------------------
>
>                 Key: POOL-221
>                 URL: https://issues.apache.org/jira/browse/POOL-221
>             Project: Commons Pool
>          Issue Type: Bug
>            Reporter: Sebb
>             Fix For: 2.0
>
>
> The field PooledObject.state is volatile, but is also always accessed in a synchronised method except in toString().
> The volatile modifier is not cost free; it might be better to remove it and add a small synch. block in toString().



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)