Use Collection#forEach() instead of Stream#forEach() for simplicity
Change-Id: I0a1aea4bdb5d305c50273e6ff749fe71bd2a295a
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTP.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTP.java
index ca50df8..b391606 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTP.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTP.java
@@ -1158,23 +1158,22 @@
.filter(key -> groupService.getGroup(deviceId, key) != null)
.collect(Collectors.toSet());
- keys.stream()
- .forEach(key -> {
- NextObjective obj = pendingGroups
- .getIfPresent(key);
- if (obj == null) {
- return;
- }
- log.debug("Group verified: dev:{} gid:{} <<->> nextId:{}",
- deviceId,
- groupService.getGroup(deviceId, key).id(),
- obj.id());
- pass(obj);
- pendingGroups.invalidate(key);
- flowObjectiveStore.putNextGroup(
- obj.id(),
- new SpringOpenGroup(key, null));
- });
+ keys.forEach(key -> {
+ NextObjective obj = pendingGroups
+ .getIfPresent(key);
+ if (obj == null) {
+ return;
+ }
+ log.debug("Group verified: dev:{} gid:{} <<->> nextId:{}",
+ deviceId,
+ groupService.getGroup(deviceId, key).id(),
+ obj.id());
+ pass(obj);
+ pendingGroups.invalidate(key);
+ flowObjectiveStore.putNextGroup(
+ obj.id(),
+ new SpringOpenGroup(key, null));
+ });
if (!pendingGroups.asMap().isEmpty()) {
// Periodically execute only if entry remains in pendingGroups.