commit | 781984f3a5c064e544625bc23477d19ce9435f20 | [log] [tgz] |
---|---|---|
author | Saritha <saritha.rt@samsung.com> | Tue Jun 27 09:46:02 2017 +0530 |
committer | Jordan Halterman <jordan@opennetworking.org> | Thu Jul 27 01:10:05 2017 +0000 |
tree | dfea6bdae4bcafb11d0e3605715488a03148e811 | |
parent | 15a71d8d6ae55f1abedde188f758ef9ee2cbd92a [diff] [blame] |
Null check added to avoid null pointer exception for lasttimestamp comparison Change-Id: Iab21c100c9bc4697b50a2c7894e254c3648e165b
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 7f1539d..d212f01 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
@@ -477,6 +477,9 @@ } Timestamp lastTimestamp = primDescs.getLatestTimestamp(); + if (lastTimestamp == null) { + lastTimestamp = deviceClockService.getTimestamp(deviceId); + } if (timestamp.compareTo(lastTimestamp) <= 0) { // outdated event ignore return null;