jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1782571 - /jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java
Date Sat, 11 Feb 2017 10:00:04 GMT
Author: fschumacher
Date: Sat Feb 11 10:00:04 2017
New Revision: 1782571

URL: http://svn.apache.org/viewvc?rev=1782571&view=rev
Log:
Make a copy of the keySet as we are modifying the collection.

Bugzilla Id: 59995

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java?rev=1782571&r1=1782570&r2=1782571&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java Sat Feb 11 10:00:04 2017
@@ -33,6 +33,7 @@ import java.lang.reflect.InvocationTarge
 import java.net.InetAddress;
 import java.net.URL;
 import java.net.UnknownHostException;
+import java.util.ArrayList;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Locale;
@@ -1171,7 +1172,7 @@ public class JMeterUtils implements Unit
             UIDefaults defaults = UIManager.getLookAndFeelDefaults();
             // If I iterate over the entrySet under ubuntu with jre 1.8.0_121
             // the font objects are missing, so iterate over the keys, only
-            for (Object key : defaults.keySet()) {
+            for (Object key : new ArrayList<Object>(defaults.keySet())) {
                 Object value = defaults.get(key);
                 log.debug("Try key {} with value {}", key, value);
                 if (value instanceof Font) {



Mime
View raw message