mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Replace "for" with "foreach"
This commit is contained in:
@@ -98,8 +98,8 @@ public class InExpressionTest {
|
||||
|
||||
List<Integer> values(int... vals) {
|
||||
ArrayList list = new ArrayList<Integer>();
|
||||
for (int i = 0; i < vals.length; i++) {
|
||||
list.add(vals[i]);
|
||||
for (int val : vals) {
|
||||
list.add(val);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
@@ -171,4 +171,4 @@ public class InExpressionTest {
|
||||
assertThat(exp("a", false, 10, "ABC").isSameByBind(exp("a", false, 10, "ABC", 30))).isFalse();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ public class TestBatchLazyWithCacheHits extends BaseTestCase {
|
||||
|
||||
ArrayList<UUOne> inserted = new ArrayList<>();
|
||||
String[] names = "A,B,C,D,E,F,G,H,I,J".split(",");
|
||||
for (int i = 0; i < names.length; i++) {
|
||||
inserted.add(insert(names[i]));
|
||||
for (String name : names) {
|
||||
inserted.add(insert(name));
|
||||
}
|
||||
|
||||
ServerCacheManager serverCacheManager = Ebean.getDefaultServer().getServerCacheManager();
|
||||
|
||||
@@ -34,8 +34,7 @@ public class TestAutofetchTuneWithJoin extends BaseTestCase {
|
||||
|
||||
List<Order> list = q.findList();
|
||||
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
Order order = list.get(i);
|
||||
for (Order order : list) {
|
||||
order.getOrderDate();
|
||||
order.getShipDate();
|
||||
// order.setShipDate(new Date(System.currentTimeMillis()));
|
||||
|
||||
Reference in New Issue
Block a user