commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "samir kerroumi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BEANUTILS-440) MethodUtils.CACHE_METHODS is not accessed in a thread-safe way
Date Fri, 21 Jun 2013 14:58:20 GMT

    [ https://issues.apache.org/jira/browse/BEANUTILS-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13690348#comment-13690348
] 

samir kerroumi commented on BEANUTILS-440:
------------------------------------------

maurizio,

I think you 're right

as a newbie on ASF and on BeanUtils code i did not pretend to modify variable declaration

at my level it is more cautious to modifiy accessors rather than delcare field as volatile

Volatile seems to be the best solution as AtomicBoolean involve synchronization mechanism


                
> MethodUtils.CACHE_METHODS is not accessed in a thread-safe way
> --------------------------------------------------------------
>
>                 Key: BEANUTILS-440
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-440
>             Project: Commons BeanUtils
>          Issue Type: Bug
>            Reporter: Sebb
>         Attachments: BEANUTILS-440.patch
>
>
> MethodUtils.CACHE_METHODS is not accessed in a thread-safe way.
> The field is a mutable static field, but is not volatile (nor Atomic) and only write
accesses are synchronised.
> If one thread writes the field, other reader threads may not see the updates immediately
(or ever). 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message