You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2006/04/30 03:25:03 UTC

svn commit: r398266 - /lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/util/NamespaceMap.java

Author: antonio
Date: Sat Apr 29 18:25:01 2006
New Revision: 398266

URL: http://svn.apache.org/viewcvs?rev=398266&view=rev
Log:
Use Map.Entry.

Modified:
    lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/util/NamespaceMap.java

Modified: lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/util/NamespaceMap.java
URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/util/NamespaceMap.java?rev=398266&r1=398265&r2=398266&view=diff
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/util/NamespaceMap.java (original)
+++ lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/util/NamespaceMap.java Sat Apr 29 18:25:01 2006
@@ -22,8 +22,6 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
-import java.util.Set;
-
 
 /**
  * An object of this class provides an easy way to access
@@ -129,18 +127,18 @@
     public static String getShortName(String prefix, String key) {
         return key.substring(prefix.length() + SEPARATOR.length());
     }
-    
+
     /**
      * Puts all prefixed key-value-pairs of map into this map.
      * @param map A map.
      */
     public void putAll(Map map) {
-        for (Iterator i = map.keySet().iterator(); i.hasNext(); ) {
-            String key = (String) i.next();
-            put(key, map.get(key));
+        for (Iterator iter = map.entrySet().iterator(); iter.hasNext(); ) {
+            Map.Entry entry = (Map.Entry)iter.next();
+            put((String)entry.getKey(), (String)entry.getValue());
         }
     }
-    
+
     /**
      * Returns a map with prefixed keys.
      * @return A map.
@@ -148,5 +146,4 @@
     public Map getPrefixedMap() {
         return new HashMap(getMapObject());
     }
-    
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org