--- a/jdk/src/share/classes/sun/management/Agent.java Mon May 14 07:26:53 2012 -0700
+++ b/jdk/src/share/classes/sun/management/Agent.java Tue May 15 16:46:10 2012 +0400
@@ -168,7 +168,10 @@
// management properties can be overridden by system properties
// which take precedence
- configProps.putAll(System.getProperties());
+ Properties sysProps = System.getProperties();
+ synchronized(sysProps){
+ configProps.putAll(sysProps);
+ }
// if user specifies config file into command line for either
// jcmd utilities or attach command it overrides properties set in
@@ -264,7 +267,10 @@
// management properties can be overridden by system properties
// which take precedence
- props.putAll(System.getProperties());
+ Properties sysProps = System.getProperties();
+ synchronized(sysProps){
+ props.putAll(sysProps);
+ }
return props;
}