Replaced Stream#forEach() with Collection#forEach()
And also replaced comparators to Compatator#comparing
Change-Id: I3759a872ee65ad6a4c660aa74ab893b67891c50f
diff --git a/src/main/java/org/opencord/cordvtn/impl/CordVtnNodeManager.java b/src/main/java/org/opencord/cordvtn/impl/CordVtnNodeManager.java
index 0fb9772..8a8bc37 100644
--- a/src/main/java/org/opencord/cordvtn/impl/CordVtnNodeManager.java
+++ b/src/main/java/org/opencord/cordvtn/impl/CordVtnNodeManager.java
@@ -615,10 +615,7 @@
return false;
}
return deviceService.getPorts(node.integrationBridgeId()).stream()
- .filter(p -> portName(p).contains(ifaceName) &&
- p.isEnabled())
- .findAny()
- .isPresent();
+ .anyMatch(p -> portName(p).contains(ifaceName) && p.isEnabled());
}
/**
@@ -868,7 +865,7 @@
return;
}
controllers = config.controllers();
- controllers.stream().forEach(ctrl -> {
+ controllers.forEach(ctrl -> {
log.debug("Added controller {}:{}", ctrl.ip(), ctrl.port());
});
}