Committed by
Gerrit Code Review
ONOS-3346 Fixed NPE when disallowing devices via network configuration.
Change-Id: I88986681e446f2fd298aa5c4d47e709da5be9e52
Showing
1 changed file
with
4 additions
and
0 deletions
... | @@ -986,6 +986,10 @@ public class GossipDeviceStore | ... | @@ -986,6 +986,10 @@ public class GossipDeviceStore |
986 | // accept removal request if given timestamp is newer than | 986 | // accept removal request if given timestamp is newer than |
987 | // the latest Timestamp from Primary provider | 987 | // the latest Timestamp from Primary provider |
988 | DeviceDescriptions primDescs = getPrimaryDescriptions(descs); | 988 | DeviceDescriptions primDescs = getPrimaryDescriptions(descs); |
989 | + if (primDescs == null) { | ||
990 | + return null; | ||
991 | + } | ||
992 | + | ||
989 | Timestamp lastTimestamp = primDescs.getLatestTimestamp(); | 993 | Timestamp lastTimestamp = primDescs.getLatestTimestamp(); |
990 | if (timestamp.compareTo(lastTimestamp) <= 0) { | 994 | if (timestamp.compareTo(lastTimestamp) <= 0) { |
991 | // outdated event ignore | 995 | // outdated event ignore | ... | ... |
-
Please register or login to post a comment