commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jochen Wiedmann (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (COLLECTIONS-334) map.StaticBucketMap.size() needs to synchronize access to lock
Date Tue, 01 Mar 2011 22:37:37 GMT

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

Jochen Wiedmann resolved COLLECTIONS-334.
-----------------------------------------

       Resolution: Fixed
    Fix Version/s: 3.2.2
         Assignee: Jochen Wiedmann

Sebb is right: The size() method is the only place not synchronizing access to the locks.
Fixed.


> 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: 3.2.2
>
>
> 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.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message