Remove if statement checking the same condition at filter()
Change-Id: I3f25b8cabfef48cc4bf693e8606d137b59a8cb7d
diff --git a/apps/vtn/src/main/java/org/onosproject/vtn/impl/VTNManager.java b/apps/vtn/src/main/java/org/onosproject/vtn/impl/VTNManager.java
index d0207d5..ee05883 100644
--- a/apps/vtn/src/main/java/org/onosproject/vtn/impl/VTNManager.java
+++ b/apps/vtn/src/main/java/org/onosproject/vtn/impl/VTNManager.java
@@ -163,9 +163,8 @@
IpAddress ip = IpAddress.valueOf(ipAddress);
Sets.newHashSet(devices).stream()
.filter(d -> Device.Type.CONTROLLER == d.type())
- .filter(d -> !device.id().equals(d.id())).forEach(d -> {
- if (!device.id().equals(d.id())
- && Device.Type.CONTROLLER == d.type()) {
+ .filter(d -> !device.id().equals(d.id()))
+ .forEach(d -> {
String ipAddress1 = d.annotations()
.value(CONTROLLER_IP_KEY);
IpAddress ip1 = IpAddress.valueOf(ipAddress1);
@@ -173,7 +172,6 @@
DriverHandler handler1 = driverService
.createHandler(d.id());
applyTunnelConfig(ip1, ip, handler1);
- }
});
}