commit | 0c4a213f50f38606d2445658adc3e50cedd3c1cf | [log] [tgz] |
---|---|---|
author | Madan Jampani <madan@onlab.us> | Mon Jun 06 10:46:02 2016 -0700 |
committer | Madan Jampani <madan@onlab.us> | Mon Jun 06 10:46:44 2016 -0700 |
tree | a099c690e20841c2dd755cf04c5c6428ec68e5c7 | |
parent | 786b7e4fa2d879872f09eb77785db600f27a5919 [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 43b89f6..884d86a 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
@@ -176,7 +176,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));