Committed by
Gerrit Code Review
Fix for NPE
Fix for NPE reported by ONOS-1171 Change-Id: Iadb960eb2806e0d33da034f36ad2a0f9c8aa1be0
Showing
2 changed files
with
23 additions
and
0 deletions
| ... | @@ -290,6 +290,14 @@ public class GossipDeviceStore | ... | @@ -290,6 +290,14 @@ public class GossipDeviceStore |
| 290 | } | 290 | } |
| 291 | 291 | ||
| 292 | } else { | 292 | } else { |
| 293 | + // FIXME Temporary hack for NPE (ONOS-1171). | ||
| 294 | + // Proper fix is to implement forwarding to master on ConfigProvider | ||
| 295 | + // redo ONOS-490 | ||
| 296 | + if (deviceNode == null) { | ||
| 297 | + // silently ignore | ||
| 298 | + return null; | ||
| 299 | + } | ||
| 300 | + | ||
| 293 | 301 | ||
| 294 | DeviceInjectedEvent deviceInjectedEvent = new DeviceInjectedEvent( | 302 | DeviceInjectedEvent deviceInjectedEvent = new DeviceInjectedEvent( |
| 295 | providerId, deviceId, deviceDescription); | 303 | providerId, deviceId, deviceDescription); |
| ... | @@ -536,6 +544,13 @@ public class GossipDeviceStore | ... | @@ -536,6 +544,13 @@ public class GossipDeviceStore |
| 536 | } | 544 | } |
| 537 | 545 | ||
| 538 | } else { | 546 | } else { |
| 547 | + // FIXME Temporary hack for NPE (ONOS-1171). | ||
| 548 | + // Proper fix is to implement forwarding to master on ConfigProvider | ||
| 549 | + // redo ONOS-490 | ||
| 550 | + if (deviceNode == null) { | ||
| 551 | + // silently ignore | ||
| 552 | + return null; | ||
| 553 | + } | ||
| 539 | 554 | ||
| 540 | PortInjectedEvent portInjectedEvent = new PortInjectedEvent(providerId, deviceId, portDescriptions); | 555 | PortInjectedEvent portInjectedEvent = new PortInjectedEvent(providerId, deviceId, portDescriptions); |
| 541 | ClusterMessage clusterMessage = new ClusterMessage( | 556 | ClusterMessage clusterMessage = new ClusterMessage( | ... | ... |
| ... | @@ -309,6 +309,14 @@ public class GossipLinkStore | ... | @@ -309,6 +309,14 @@ public class GossipLinkStore |
| 309 | } | 309 | } |
| 310 | 310 | ||
| 311 | } else { | 311 | } else { |
| 312 | + // FIXME Temporary hack for NPE (ONOS-1171). | ||
| 313 | + // Proper fix is to implement forwarding to master on ConfigProvider | ||
| 314 | + // redo ONOS-490 | ||
| 315 | + if (dstNode == null) { | ||
| 316 | + // silently ignore | ||
| 317 | + return null; | ||
| 318 | + } | ||
| 319 | + | ||
| 312 | 320 | ||
| 313 | LinkInjectedEvent linkInjectedEvent = new LinkInjectedEvent(providerId, linkDescription); | 321 | LinkInjectedEvent linkInjectedEvent = new LinkInjectedEvent(providerId, linkDescription); |
| 314 | ClusterMessage linkInjectedMessage = new ClusterMessage(localNode, | 322 | ClusterMessage linkInjectedMessage = new ClusterMessage(localNode, | ... | ... |
-
Please register or login to post a comment