Bug 2690 - Yang-Data-Impl: write and then merge on same list in 45/19145/7
authorJan Hajnar <jhajnar@cisco.com>
Mon, 27 Apr 2015 12:29:09 +0000 (14:29 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 6 May 2015 12:49:45 +0000 (12:49 +0000)
commit2d7548bb1ebb925625358da86fba0831cd9b73ad
treec29843c378bd6ff42a2a9afc6abaece1ca2a0d98
parentac5392a77724722de45600da3be29c4a8a8a681d
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>
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