Fix ModificationType.APPEARED mapping 65/67665/3
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 29 Jan 2018 11:02:41 +0000 (12:02 +0100)
committerRobert Varga <nite@hq.sk>
Sun, 25 Feb 2018 22:24:57 +0000 (22:24 +0000)
When a node appears, it is an event equivalent to a WRITE,
not SUBTREE_MODIFIED, otherwise we are logically crossing
a non-existent node.

Change-Id: I0876a18ec4af799db30c384fe4a7e38b9b2833c7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/LazyDataObjectModification.java

index 4643323af690a98dc8fa78aa8b6c8b08cf5178e7..35c320d30c97af746d85fa75fc0595f3470d0a52 100644 (file)
@@ -138,9 +138,9 @@ final class LazyDataObjectModification<T extends DataObject> implements DataObje
     @Override
     public DataObjectModification.ModificationType getModificationType() {
         switch(domData.getModificationType()) {
+            case APPEARED:
             case WRITE:
                 return DataObjectModification.ModificationType.WRITE;
-            case APPEARED:
             case SUBTREE_MODIFIED:
                 return DataObjectModification.ModificationType.SUBTREE_MODIFIED;
             case DISAPPEARED: