commit | 68a85126563f1cc7980a3c9b8bf44ddbe0c9ec61 | [log] [tgz] |
---|---|---|
author | Derek Baum <dbaum@apache.org> | Thu May 13 00:44:09 2010 +0000 |
committer | Derek Baum <dbaum@apache.org> | Thu May 13 00:44:09 2010 +0000 |
tree | e25dceaaf178152d3f9cc440276ffa6d65891c24 | |
parent | 8181e47debaee2eded6101c498ca9acdeeb136a7 [diff] |
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; } }