Author: jgrassel
Date: Mon Oct 10 20:21:11 2016
New Revision: 1764177

URL: http://svn.apache.org/viewvc?rev=1764177&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=1764177&r1=1764176&r2=1764177&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 20:21:11 2016
@@ -188,10 +188,12 @@ public class ConfigurationImpl
         try {
                Properties systemProperties = AccessController.doPrivileged(
                     J2DoPrivHelper.getPropertiesAction());
+               HashMap sysPropHM = null;
                synchronized(systemProperties) {
                        // Prevent concurrent modification of systemProperties 
until HashMap ctor is completed.
-                       fromProperties(new HashMap(systemProperties));
+                       sysPropHM = new HashMap(systemProperties);
                }
+               fromProperties(sysPropHM);
         } catch (SecurityException se) {
             // security manager might disallow
         }


Reply via email to