Jonathan Hart
Committed by Gerrit Code Review

Fix for NPE in SDNIP

Change-Id: I368db30e40b2081e92901e413f8c87e9db98e086
...@@ -35,6 +35,8 @@ import org.onosproject.routing.RoutingService; ...@@ -35,6 +35,8 @@ import org.onosproject.routing.RoutingService;
35 import org.onosproject.routing.config.RoutingConfigurationService; 35 import org.onosproject.routing.config.RoutingConfigurationService;
36 import org.slf4j.Logger; 36 import org.slf4j.Logger;
37 37
38 +import java.util.Objects;
39 +
38 import static org.slf4j.LoggerFactory.getLogger; 40 import static org.slf4j.LoggerFactory.getLogger;
39 41
40 /** 42 /**
...@@ -152,8 +154,7 @@ public class SdnIp implements SdnIpService { ...@@ -152,8 +154,7 @@ public class SdnIp implements SdnIpService {
152 if (!event.subject().topic().equals(appId.name())) { 154 if (!event.subject().topic().equals(appId.name())) {
153 return; // Not our topic: ignore 155 return; // Not our topic: ignore
154 } 156 }
155 - if (!event.subject().leader().equals( 157 + if (Objects.equals(event.subject().leader(), localControllerNode.id())) {
156 - localControllerNode.id())) {
157 return; // The event is not about this instance: ignore 158 return; // The event is not about this instance: ignore
158 } 159 }
159 160
......