commit | 294195dc6c76b774aec851ba0ad29946871abe14 | [log] [tgz] |
---|---|---|
author | Madan Jampani <madan@onlab.us> | Mon Jun 06 10:46:02 2016 -0700 |
committer | Ray Milkey <ray@onlab.us> | Mon Jun 06 11:31:11 2016 -0700 |
tree | 6ba9d36c9cd7b3c3c883108e2ffb24de1570b644 | |
parent | 053b05e2ae98b822668b46a67ee86e82f28cf0a8 [diff] |
Fix GossipIntentStore purge logic to ignore purge requests for non-existent intent data Change-Id: Ie5083ca7096bcdf1f94e80fe88d9ef65ac0f2420
diff --git a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/GossipIntentStore.java b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/GossipIntentStore.java index 98aa3cf..4583be2 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/GossipIntentStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/GossipIntentStore.java
@@ -177,7 +177,7 @@ if (IntentData.isUpdateAcceptable(currentData, newData)) { // Only the master is modifying the current state. Therefore assume // this always succeeds - if (newData.state() == PURGE_REQ) { + if (newData.state() == PURGE_REQ && currentData != null) { currentMap.remove(newData.key(), currentData); } else { currentMap.put(newData.key(), new IntentData(newData));