Bug 2690 - Yang-Data-Impl: write and then merge on same list in 09/19709/2
authorJan Hajnar <jhajnar@cisco.com>
Mon, 27 Apr 2015 12:29:09 +0000 (14:29 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 7 May 2015 09:33:17 +0000 (09:33 +0000)
commite89320aae6e40db4600eec423f2e02160fadda80
treeae10ca177880b592496769803923bd8687295228
parent5334a8737978c5289d64a159d0601bec1d914134
Bug 2690 - Yang-Data-Impl: write and then merge on same list in
modification produces incorrect result

* added check for previous WRITE operation in recursiveMerge().
If there is some WRITE operation before MERGE we create new WRITE
operations for children => our data created by WRITE won't be
overwritten by merge on container/list.
* These children WRITE transactions will be recursively pushed down in the tree
while there are merge operations on them

Change-Id: Ie346c61c52cb000ee950d137f39d42e1ead3e1ff
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
(cherry picked from commit 2d7548bb1ebb925625358da86fba0831cd9b73ad)
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/tree/OperationWithModification.java
yang/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/leafref/context/test/DataTreeCandidateValidatorTest3.java
yang/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/schema/tree/Bug2690FixTest.java [new file with mode: 0644]
yang/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/schema/tree/ListConstraintsValidationTest.java