commit | 7ddea787bc62ef72679aa3f164bced3e1d63a0ce | [log] [tgz] |
---|---|---|
author | Jian Li <pyguni@gmail.com> | Fri Mar 30 11:17:42 2018 +0900 |
committer | Jian Li <pyguni@gmail.com> | Fri Mar 30 07:31:33 2018 +0000 |
tree | b18d54efa019cc66035a1ac10a3c7980136c4812 | |
parent | f7921bd74d9ef304241efac79f83a805c911a1d0 [diff] |
Fix: resolve NPE when inject non-existing compute node through SONA Change-Id: I4b828c0c8e303bc1c27854899a5dc568a8be55cb
diff --git a/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingHostProvider.java b/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingHostProvider.java index 0c2ea39..14ee117 100644 --- a/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingHostProvider.java +++ b/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingHostProvider.java
@@ -292,6 +292,9 @@ public boolean isRelevant(OpenstackNodeEvent event) { // do not allow to proceed without mastership Device device = deviceService.getDevice(event.subject().intgBridge()); + if (device == null) { + return false; + } return mastershipService.isLocalMaster(device.id()); }