BUG-2399: take into account new ModificationTypes
[controller.git] / opendaylight / md-sal / sal-inmemory-datastore / src / main / java / org / opendaylight / controller / md / sal / dom / store / impl / ResolveDataChangeEventsTask.java
index 5c7ff7df1ee0b6e14abcc2849a112bdb7af304c1..e1eebe65ab5d597d2be9ce9f21816f0cf9de49be 100644 (file)
@@ -118,6 +118,7 @@ public final class ResolveDataChangeEventsTask {
         switch (type) {
         case SUBTREE_MODIFIED:
             return resolveSubtreeChangeEvent(state, node);
+        case APPEARED:
         case WRITE:
             Preconditions.checkArgument(maybeAfter.isPresent(),
                     "Modification at {} has type {} but no after-data", state.getPath(), type);
@@ -129,6 +130,7 @@ public final class ResolveDataChangeEventsTask {
             }
 
             return resolveReplacedEvent(state, maybeBefore.get(), maybeAfter.get());
+        case DISAPPEARED:
         case DELETE:
             Preconditions.checkArgument(maybeBefore.isPresent(),
                     "Modification at {} has type {} but no before-data", state.getPath(), type);
@@ -277,8 +279,10 @@ public final class ResolveDataChangeEventsTask {
             final ResolveDataChangeState childState = state.child(childMod.getIdentifier());
 
             switch (childMod.getModificationType()) {
-            case WRITE:
+            case APPEARED:
             case DELETE:
+            case DISAPPEARED:
+            case WRITE:
                 if (resolveAnyChangeEvent(childState, childMod)) {
                     scope = DataChangeScope.ONE;
                 }