[jira] [Updated] (COLLECTIONS-334) map.StaticBucketMap.size() needs to synchronize access to lock

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (COLLECTIONS-334) map.StaticBucketMap.size() needs to synchronize access to lock

Phil Steitz (Jira)

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

Thomas Neidhart updated COLLECTIONS-334:
----------------------------------------

    Fix Version/s:     (was: 3.2.2)
   

> map.StaticBucketMap.size() needs to synchronize access to lock
> --------------------------------------------------------------
>
>                 Key: COLLECTIONS-334
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-334
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: Collection
>         Environment: collections_jdk5_branch
>            Reporter: Sebb
>            Assignee: Jochen Wiedmann
>             Fix For: 4.0
>
>
> The field Lock.size is updated using synchronization, however the StaticBucketMap.size() method reads the values without synch.
> If the read is done in a different thread from the updates, there is no guarantee that the reading thread will see the most recent value.

--
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