[ 
https://issues.apache.org/jira/browse/POOL-158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831012#action_12831012
 ] 

Sebb commented on POOL-158:
---------------------------

Note that GenericObjectPool is OK in this regard because it only accesses 
_minIdle via the synch. getter/setter after construction.

> References to GenericKeyedObjectPool._minIdle are not always synchronized
> -------------------------------------------------------------------------
>
>                 Key: POOL-158
>                 URL: https://issues.apache.org/jira/browse/POOL-158
>             Project: Commons Pool
>          Issue Type: Bug
>            Reporter: Sebb
>
> References to GenericKeyedObjectPool._minIdle are not always synchronized:
> The ensureMinIdle() and evict() methods both access the field outside the 
> synch. block.
> This is particularly bad as they are called from the timer thread.
> The references could use getMinIdle(), which is synch., or it would probably 
> be cheaper to move the references into the synch. blocks.
> Better yet, can the field be made final? setMinIdle() is currently only 
> called from Test cases and setConfig() which is not referenced AFAICT.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to