click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r962381 - /click/trunk/click/extras/src/org/apache/click/extras/tree/Tree.java
Date Fri, 09 Jul 2010 01:16:06 GMT
Author: sabob
Date: Fri Jul  9 01:16:06 2010
New Revision: 962381

URL: http://svn.apache.org/viewvc?rev=962381&view=rev
Log:
use entrySet instead of iterator + extra lookup

Modified:
    click/trunk/click/extras/src/org/apache/click/extras/tree/Tree.java

Modified: click/trunk/click/extras/src/org/apache/click/extras/tree/Tree.java
URL: http://svn.apache.org/viewvc/click/trunk/click/extras/src/org/apache/click/extras/tree/Tree.java?rev=962381&r1=962380&r2=962381&view=diff
==============================================================================
--- click/trunk/click/extras/src/org/apache/click/extras/tree/Tree.java (original)
+++ click/trunk/click/extras/src/org/apache/click/extras/tree/Tree.java Fri Jul  9 01:16:06
2010
@@ -54,7 +54,7 @@ import org.apache.commons.lang.StringUti
  * on a hierarchy of {@link TreeNode}'s. Each TreeNode must provide a
  * uniquely identified node in the hierarchy.
  * <p/>
- * Below is screenshot of how the tree will render in a browser.
+ * Below is a screenshot of the tree in action.
  *
  * <table cellspacing='10'>
  * <tr>
@@ -565,7 +565,7 @@ public class Tree extends AbstractContro
      * the tree's nodes.
      */
     public void bindExpandOrCollapseValues() {
-        expandOrCollapseNodeIds = getExpandLink().getParameterValues(EXPAND_TREE_NODE_PARAM);

+        expandOrCollapseNodeIds = getExpandLink().getParameterValues(EXPAND_TREE_NODE_PARAM);
     }
 
     /**
@@ -1613,10 +1613,11 @@ public class Tree extends AbstractContro
         buffer.append(uri);
         if (parameters != null && !parameters.isEmpty()) {
             buffer.append("?");
-            Iterator<String> i = parameters.keySet().iterator();
+            Iterator i = parameters.entrySet().iterator();
             while (i.hasNext()) {
-                String name = i.next();
-                String value = parameters.get(name).toString();
+                Map.Entry entry = (Map.Entry) i.next();
+                String name = entry.getKey().toString();
+                String value = entry.getValue().toString();
 
                 buffer.append(name);
                 buffer.append("=");



Mime
View raw message