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 909CB200B9C for ; Mon, 10 Oct 2016 20:05:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8F6B2160AE1; Mon, 10 Oct 2016 18:05:05 +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 D50C1160AD1 for ; Mon, 10 Oct 2016 20:05:04 +0200 (CEST) Received: (qmail 33324 invoked by uid 500); 10 Oct 2016 18:05:04 -0000 Mailing-List: contact commits-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list commits@openjpa.apache.org Received: (qmail 33314 invoked by uid 99); 10 Oct 2016 18:05:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Oct 2016 18:05:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id AF709C1265 for ; Mon, 10 Oct 2016 18:05:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id PFKNJ2YvEp1T for ; Mon, 10 Oct 2016 18:05:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id C3FF15FAC3 for ; Mon, 10 Oct 2016 18:05:02 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 0AE57E0147 for ; Mon, 10 Oct 2016 18:04:56 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id D11863A0218 for ; Mon, 10 Oct 2016 18:04:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1764159 - /openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java Date: Mon, 10 Oct 2016 18:04:55 -0000 To: commits@openjpa.apache.org From: jgrassel@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20161010180455.D11863A0218@svn01-us-west.apache.org> archived-at: Mon, 10 Oct 2016 18:05:05 -0000 Author: jgrassel Date: Mon Oct 10 18:04:55 2016 New Revision: 1764159 URL: http://svn.apache.org/viewvc?rev=1764159&view=rev Log: OPENJPA-2672: ConfigurationImpl.loadGlobals() has java.util.ConcurrentModificationException vulnerability Modified: openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java Modified: openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java?rev=1764159&r1=1764158&r2=1764159&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java (original) +++ openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java Mon Oct 10 18:04:55 2016 @@ -186,9 +186,12 @@ public class ConfigurationImpl // let system properties override other globals try { - fromProperties(new HashMap( - AccessController.doPrivileged( - J2DoPrivHelper.getPropertiesAction()))); + Properties systemProperties = AccessController.doPrivileged( + J2DoPrivHelper.getPropertiesAction()); + synchronized(systemProperties) { + // Prevent concurrent modification of systemProperties until HashMap ctor is completed. + fromProperties(new HashMap(systemProperties)); + } } catch (SecurityException se) { // security manager might disallow }