Sho SHIMIZU
Committed by Gerrit Code Review

Remove if statement checking the same condition at filter()

Change-Id: I3f25b8cabfef48cc4bf693e8606d137b59a8cb7d
...@@ -163,9 +163,8 @@ public class VTNManager implements VTNService { ...@@ -163,9 +163,8 @@ public class VTNManager implements VTNService {
163 IpAddress ip = IpAddress.valueOf(ipAddress); 163 IpAddress ip = IpAddress.valueOf(ipAddress);
164 Sets.newHashSet(devices).stream() 164 Sets.newHashSet(devices).stream()
165 .filter(d -> Device.Type.CONTROLLER == d.type()) 165 .filter(d -> Device.Type.CONTROLLER == d.type())
166 - .filter(d -> !device.id().equals(d.id())).forEach(d -> { 166 + .filter(d -> !device.id().equals(d.id()))
167 - if (!device.id().equals(d.id()) 167 + .forEach(d -> {
168 - && Device.Type.CONTROLLER == d.type()) {
169 String ipAddress1 = d.annotations() 168 String ipAddress1 = d.annotations()
170 .value(CONTROLLER_IP_KEY); 169 .value(CONTROLLER_IP_KEY);
171 IpAddress ip1 = IpAddress.valueOf(ipAddress1); 170 IpAddress ip1 = IpAddress.valueOf(ipAddress1);
...@@ -173,7 +172,6 @@ public class VTNManager implements VTNService { ...@@ -173,7 +172,6 @@ public class VTNManager implements VTNService {
173 DriverHandler handler1 = driverService 172 DriverHandler handler1 = driverService
174 .createHandler(d.id()); 173 .createHandler(d.id());
175 applyTunnelConfig(ip1, ip, handler1); 174 applyTunnelConfig(ip1, ip, handler1);
176 - }
177 }); 175 });
178 } 176 }
179 177
......