Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D638A200CD1 for ; Tue, 11 Jul 2017 19:55:37 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D4DBE166B6D; Tue, 11 Jul 2017 17:55:37 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 26C9E166B6B for ; Tue, 11 Jul 2017 19:55:37 +0200 (CEST) Received: (qmail 31929 invoked by uid 500); 11 Jul 2017 17:55:32 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 31309 invoked by uid 99); 11 Jul 2017 17:55:32 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jul 2017 17:55:32 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DCFF4F21B0; Tue, 11 Jul 2017 17:55:31 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: chtompki@apache.org To: commits@commons.apache.org Date: Tue, 11 Jul 2017 17:55:44 -0000 Message-Id: In-Reply-To: <0985308b60b3472aa9df08a80ff86a6a@git.apache.org> References: <0985308b60b3472aa9df08a80ff86a6a@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [14/50] commons-collections git commit: Backport COLLECTIONS-334 to 3.2.2. archived-at: Tue, 11 Jul 2017 17:55:38 -0000 Backport COLLECTIONS-334 to 3.2.2. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/branches/COLLECTIONS_3_2_X@1713294 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-collections/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-collections/commit/d75768a4 Tree: http://git-wip-us.apache.org/repos/asf/commons-collections/tree/d75768a4 Diff: http://git-wip-us.apache.org/repos/asf/commons-collections/diff/d75768a4 Branch: refs/heads/COLLECTIONS_3_2_X Commit: d75768a4b2e71f88bf47ee45163fd671bebbd7e3 Parents: 6a7d35d Author: Thomas Neidhart Authored: Sun Nov 8 21:07:13 2015 +0000 Committer: Thomas Neidhart Committed: Sun Nov 8 21:07:13 2015 +0000 ---------------------------------------------------------------------- src/changes/changes.xml | 6 +++--- .../org/apache/commons/collections/map/StaticBucketMap.java | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-collections/blob/d75768a4/src/changes/changes.xml ---------------------------------------------------------------------- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 9d3a1b7..053ccc5 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -35,6 +35,9 @@ Fixed cache assignment for "TreeBidiMap#entrySet". + + Synchronized access to lock in "StaticBucketMap#size()". + "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. - - Synchronized access to lock in "StaticBucketMap#size()". - "LRUMap#keySet()#remove(Object)" will not throw a "ConcurrentModificationException" anymore. http://git-wip-us.apache.org/repos/asf/commons-collections/blob/d75768a4/src/java/org/apache/commons/collections/map/StaticBucketMap.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/commons/collections/map/StaticBucketMap.java b/src/java/org/apache/commons/collections/map/StaticBucketMap.java index 4a130c3..1a0d379 100644 --- a/src/java/org/apache/commons/collections/map/StaticBucketMap.java +++ b/src/java/org/apache/commons/collections/map/StaticBucketMap.java @@ -182,7 +182,9 @@ public final class StaticBucketMap implements Map { int cnt = 0; for (int i = 0; i < buckets.length; i++) { - cnt += locks[i].size; + synchronized(locks[i]) { + cnt += locks[i].size; + } } return cnt; }