commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1557343 - /commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/util/MapUtils.java
Date Sat, 11 Jan 2014 11:14:07 GMT
Author: britter
Date: Sat Jan 11 11:14:06 2014
New Revision: 1557343

URL: http://svn.apache.org/r1557343
Log:
Use enhanced for loop over entry set

Modified:
    commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/util/MapUtils.java

Modified: commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/util/MapUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/util/MapUtils.java?rev=1557343&r1=1557342&r2=1557343&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/util/MapUtils.java (original)
+++ commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/util/MapUtils.java Sat
Jan 11 11:14:06 2014
@@ -65,10 +65,7 @@ public class MapUtils
 
         final Map<String, V> result = new HashMap<String, V>();
 
-        final Iterator<Map.Entry<K, V>> iter = source.entrySet().iterator();
-
-        while (iter.hasNext()) {
-            final Map.Entry<K, V> entry = iter.next();
+        for (Map.Entry<K, V> entry : source.entrySet()) {
             final K key = entry.getKey();
             final V value = entry.getValue();
             result.put(prefix + '.' + key.toString(), value);



Mime
View raw message