aboutsummaryrefslogtreecommitdiffstats
path: root/compatibility-server/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'compatibility-server/src/test')
-rw-r--r--compatibility-server/src/test/java/com/vaadin/v7/data/util/BeanItemContainerTest.java6
-rw-r--r--compatibility-server/src/test/java/com/vaadin/v7/data/util/ContainerSortingTest.java5
2 files changed, 3 insertions, 8 deletions
diff --git a/compatibility-server/src/test/java/com/vaadin/v7/data/util/BeanItemContainerTest.java b/compatibility-server/src/test/java/com/vaadin/v7/data/util/BeanItemContainerTest.java
index 31d96fb47e..dee7c3fee3 100644
--- a/compatibility-server/src/test/java/com/vaadin/v7/data/util/BeanItemContainerTest.java
+++ b/compatibility-server/src/test/java/com/vaadin/v7/data/util/BeanItemContainerTest.java
@@ -9,7 +9,6 @@ import static org.junit.Assert.assertTrue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
-import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -60,9 +59,8 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
beanItemContainer.removeAllItems();
- Iterator<ClassName> it = nameToBean.values().iterator();
- while (it.hasNext()) {
- beanItemContainer.addBean(it.next());
+ for (ClassName name : nameToBean.values()) {
+ beanItemContainer.addBean(name);
}
}
diff --git a/compatibility-server/src/test/java/com/vaadin/v7/data/util/ContainerSortingTest.java b/compatibility-server/src/test/java/com/vaadin/v7/data/util/ContainerSortingTest.java
index 860f3b7b15..539835f1c5 100644
--- a/compatibility-server/src/test/java/com/vaadin/v7/data/util/ContainerSortingTest.java
+++ b/compatibility-server/src/test/java/com/vaadin/v7/data/util/ContainerSortingTest.java
@@ -1,7 +1,6 @@
package com.vaadin.v7.data.util;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.Map;
import org.junit.Test;
@@ -154,10 +153,8 @@ public class ContainerSortingTest {
private void verifyOrder(Container.Sortable ic, Object[] idOrder) {
int size = ic.size();
Object[] actual = new Object[size];
- Iterator<?> i = ic.getItemIds().iterator();
int index = 0;
- while (i.hasNext()) {
- Object o = i.next();
+ for (Object o : ic.getItemIds()) {
if (o.getClass() == Integer.class
&& idOrder[index].getClass() == String.class) {
o = idToName.get(o);