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 74aa834..e92467d 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:

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.