HIGUCHI Yuta
Committed by Gerrit Code Review

Fix for NPE

Fix for NPE reported by ONOS-1171

Change-Id: Iadb960eb2806e0d33da034f36ad2a0f9c8aa1be0
......@@ -290,6 +290,14 @@ public class GossipDeviceStore
}
} else {
// FIXME Temporary hack for NPE (ONOS-1171).
// Proper fix is to implement forwarding to master on ConfigProvider
// redo ONOS-490
if (deviceNode == null) {
// silently ignore
return null;
}
DeviceInjectedEvent deviceInjectedEvent = new DeviceInjectedEvent(
providerId, deviceId, deviceDescription);
......@@ -536,6 +544,13 @@ public class GossipDeviceStore
}
} else {
// FIXME Temporary hack for NPE (ONOS-1171).
// Proper fix is to implement forwarding to master on ConfigProvider
// redo ONOS-490
if (deviceNode == null) {
// silently ignore
return null;
}
PortInjectedEvent portInjectedEvent = new PortInjectedEvent(providerId, deviceId, portDescriptions);
ClusterMessage clusterMessage = new ClusterMessage(
......
......@@ -309,6 +309,14 @@ public class GossipLinkStore
}
} else {
// FIXME Temporary hack for NPE (ONOS-1171).
// Proper fix is to implement forwarding to master on ConfigProvider
// redo ONOS-490
if (dstNode == null) {
// silently ignore
return null;
}
LinkInjectedEvent linkInjectedEvent = new LinkInjectedEvent(providerId, linkDescription);
ClusterMessage linkInjectedMessage = new ClusterMessage(localNode,
......