commit | 710293f3afa03540a1fd3be038da0ea6a488765c | [log] [tgz] |
---|---|---|
author | Thomas Vachuska <tom@onlab.us> | Fri Nov 13 12:29:31 2015 -0800 |
committer | Gerrit Code Review <gerrit@onlab.us> | Fri Nov 13 21:39:03 2015 +0000 |
tree | 4e7c8f292ccfcebf05a5b1ef801d2480965ae5c9 | |
parent | 1627dc8ed667722542166d7e5039799034494e4d [diff] |
ONOS-3346 Fixed NPE when disallowing devices via network configuration. Change-Id: I88986681e446f2fd298aa5c4d47e709da5be9e52
diff --git a/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java b/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java index 687762e..85e67de 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java
@@ -986,6 +986,10 @@ // accept removal request if given timestamp is newer than // the latest Timestamp from Primary provider DeviceDescriptions primDescs = getPrimaryDescriptions(descs); + if (primDescs == null) { + return null; + } + Timestamp lastTimestamp = primDescs.getLatestTimestamp(); if (timestamp.compareTo(lastTimestamp) <= 0) { // outdated event ignore