You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2015/11/08 22:07:13 UTC
svn commit: r1713294 - in
/commons/proper/collections/branches/COLLECTIONS_3_2_X/src:
changes/changes.xml
java/org/apache/commons/collections/map/StaticBucketMap.java
Author: tn
Date: Sun Nov 8 21:07:13 2015
New Revision: 1713294
URL: http://svn.apache.org/viewvc?rev=1713294&view=rev
Log:
Backport COLLECTIONS-334 to 3.2.2.
Modified:
commons/proper/collections/branches/COLLECTIONS_3_2_X/src/changes/changes.xml
commons/proper/collections/branches/COLLECTIONS_3_2_X/src/java/org/apache/commons/collections/map/StaticBucketMap.java
Modified: commons/proper/collections/branches/COLLECTIONS_3_2_X/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/collections/branches/COLLECTIONS_3_2_X/src/changes/changes.xml?rev=1713294&r1=1713293&r2=1713294&view=diff
==============================================================================
--- commons/proper/collections/branches/COLLECTIONS_3_2_X/src/changes/changes.xml (original)
+++ commons/proper/collections/branches/COLLECTIONS_3_2_X/src/changes/changes.xml Sun Nov 8 21:07:13 2015
@@ -35,6 +35,9 @@
<action issue="COLLECTIONS-335" dev="jochen" type="fix" due-to="sebb">
Fixed cache assignment for "TreeBidiMap#entrySet".
</action>
+ <action issue="COLLECTIONS-334" dev="jochen" type="fix" due-to="sebb">
+ Synchronized access to lock in "StaticBucketMap#size()".
+ </action>
<action issue="COLLECTIONS-294" dev="bayard" type="fix" due-to="Benjamin Bentmann">
"CaseInsensitiveMap" will now convert input strings to lower-case in a
locale-independent manner.
@@ -76,9 +79,6 @@
"ListUtils#intersection(List, List)" will now also work correctly if there
are duplicate elements in the provided lists.
</action>
- <action issue="COLLECTIONS-334" dev="jochen" type="fix" due-to="sebb">
- Synchronized access to lock in "StaticBucketMap#size()".
- </action>
<action issue="COLLECTIONS-330" dev="mbenson" type="fix" due-to="Joerg Schaible">
"LRUMap#keySet()#remove(Object)" will not throw a "ConcurrentModificationException" anymore.
</action>
Modified: commons/proper/collections/branches/COLLECTIONS_3_2_X/src/java/org/apache/commons/collections/map/StaticBucketMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/branches/COLLECTIONS_3_2_X/src/java/org/apache/commons/collections/map/StaticBucketMap.java?rev=1713294&r1=1713293&r2=1713294&view=diff
==============================================================================
--- commons/proper/collections/branches/COLLECTIONS_3_2_X/src/java/org/apache/commons/collections/map/StaticBucketMap.java (original)
+++ commons/proper/collections/branches/COLLECTIONS_3_2_X/src/java/org/apache/commons/collections/map/StaticBucketMap.java Sun Nov 8 21:07:13 2015
@@ -182,7 +182,9 @@ public final class StaticBucketMap imple
int cnt = 0;
for (int i = 0; i < buckets.length; i++) {
- cnt += locks[i].size;
+ synchronized(locks[i]) {
+ cnt += locks[i].size;
+ }
}
return cnt;
}