fix ConcurrentModificationException caused by bad refactoring :-(


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@943762 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/shell/CommandProcessorImpl.java b/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/shell/CommandProcessorImpl.java
index 4a40f5b..e8e3bf7 100644
--- a/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/shell/CommandProcessorImpl.java
+++ b/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/shell/CommandProcessorImpl.java
@@ -27,6 +27,7 @@
 import java.util.Map;
 import java.util.Set;
 import java.util.TreeSet;
+import java.util.Map.Entry;
 
 import org.osgi.service.command.CommandProcessor;
 import org.osgi.service.command.CommandSession;
@@ -89,11 +90,11 @@
             {
                 if (scope.equals("*"))
                 {
-                    for (String key : commands.keySet())
+                    for (Entry<String, Object> entry : commands.entrySet())
                     {
-                        if (key.endsWith(cfunction))
+                        if (entry.getKey().endsWith(cfunction))
                         {
-                            cmd = commands.get(key);
+                            cmd = entry.getValue();
                             break;
                         }
                     }