diff options
Diffstat (limited to 'server/src/main/java/com/vaadin/ui/MenuBar.java')
-rw-r--r-- | server/src/main/java/com/vaadin/ui/MenuBar.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/server/src/main/java/com/vaadin/ui/MenuBar.java b/server/src/main/java/com/vaadin/ui/MenuBar.java index 35988bb84d..f7682408d4 100644 --- a/server/src/main/java/com/vaadin/ui/MenuBar.java +++ b/server/src/main/java/com/vaadin/ui/MenuBar.java @@ -20,7 +20,6 @@ import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Collection; import java.util.Deque; -import java.util.Iterator; import java.util.List; import java.util.Map; @@ -169,9 +168,8 @@ public class MenuBar extends AbstractComponent if (variables.containsKey("clickedId")) { Integer clickedId = (Integer) variables.get("clickedId"); - Iterator<MenuItem> itr = getItems().iterator(); - while (itr.hasNext()) { - items.push(itr.next()); + for (MenuItem i : getItems()) { + items.push(i); } MenuItem tmpItem = null; @@ -182,9 +180,8 @@ public class MenuBar extends AbstractComponent found = (clickedId == tmpItem.getId()); if (tmpItem.hasChildren()) { - itr = tmpItem.getChildren().iterator(); - while (itr.hasNext()) { - items.push(itr.next()); + for (MenuItem i : tmpItem.getChildren()) { + items.push(i); } } |