felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From db...@apache.org
Subject svn commit: r943762 - /felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/shell/CommandProcessorImpl.java
Date Thu, 13 May 2010 00:44:10 GMT
Author: dbaum
Date: Thu May 13 00:44:09 2010
New Revision: 943762

URL: http://svn.apache.org/viewvc?rev=943762&view=rev
Log:
fix ConcurrentModificationException caused by bad refactoring :-(

Modified:
    felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/shell/CommandProcessorImpl.java

Modified: felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/shell/CommandProcessorImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/shell/CommandProcessorImpl.java?rev=943762&r1=943761&r2=943762&view=diff
==============================================================================
--- felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/shell/CommandProcessorImpl.java
(original)
+++ felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/shell/CommandProcessorImpl.java
Thu May 13 00:44:09 2010
@@ -27,6 +27,7 @@ import java.util.LinkedHashMap;
 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 @@ public class CommandProcessorImpl implem
             {
                 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;
                         }
                     }



Mime
View raw message