Sho SHIMIZU

Use for-each statement

Change-Id: Ib89f3372caebc30542739c0eba62f67ef56a4d4e
......@@ -606,17 +606,14 @@ public class SimpleGroupStore
+ "southboundGroupEntries for device {}",
southboundGroupEntries.size(),
deviceId);
for (Iterator<Group> it = southboundGroupEntries.iterator(); it.hasNext();) {
Group group = it.next();
for (Group group : southboundGroupEntries) {
log.trace("Group {} in device {}", group, deviceId);
}
log.trace("Displaying all ({}) stored group entries for device {}",
storedGroupEntries.size(),
deviceId);
for (Iterator<Group> it1 = storedGroupEntries.iterator();
it1.hasNext();) {
Group group = it1.next();
for (Group group : storedGroupEntries) {
log.trace("Stored Group {} for device {}", group, deviceId);
}
......
......@@ -1261,17 +1261,14 @@ public class DistributedGroupStore
log.trace("pushGroupMetrics: Displaying all ({}) southboundGroupEntries for device {}",
southboundGroupEntries.size(),
deviceId);
for (Iterator<Group> it = southboundGroupEntries.iterator(); it.hasNext();) {
Group group = it.next();
for (Group group : southboundGroupEntries) {
log.trace("Group {} in device {}", group, deviceId);
}
log.trace("Displaying all ({}) stored group entries for device {}",
storedGroupEntries.size(),
deviceId);
for (Iterator<StoredGroupEntry> it1 = storedGroupEntries.iterator();
it1.hasNext();) {
Group group = it1.next();
for (StoredGroupEntry group : storedGroupEntries) {
log.trace("Stored Group {} for device {}", group, deviceId);
}
......
......@@ -82,9 +82,8 @@ public class PersistentSet<E> implements Set<E> {
public Object[] toArray() {
Object[] retArray = new Object[items.size()];
int index = 0;
Iterator<byte[]> iterator = items.iterator();
while (iterator.hasNext()) {
retArray[index] = serializer.decode(iterator.next());
for (byte[] item : items) {
retArray[index] = serializer.decode(item);
index++;
}
return retArray;
......@@ -191,4 +190,4 @@ public class PersistentSet<E> implements Set<E> {
public int hashCode() {
return super.hashCode();
}
}
\ No newline at end of file
}
......