Fix ModificationType.APPEARED mapping 54/67654/5
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 29 Jan 2018 11:02:41 +0000 (12:02 +0100)
committerTom Pantelis <tompantelis@gmail.com>
Mon, 29 Jan 2018 23:47:04 +0000 (23:47 +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 74aa834818342ba6a3cf3f64a5b8cb7149ec04c0..e92467d1d3ed66770e1da990d55336352d141db0 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: