Bypass data tree generation on empty merge 31/13531/1
authorRobert Varga <rovarga@cisco.com>
Wed, 10 Dec 2014 10:30:51 +0000 (11:30 +0100)
committerRobert Varga <rovarga@cisco.com>
Wed, 10 Dec 2014 10:30:51 +0000 (11:30 +0100)
commit93b0b3872f0a7a4f41c2db5d4c97669d66c8d5d2
tree87509268834e46bfde9a566bedd3a65792533084
parentfd885fa0d525e01a53125dea29e3cd13cd9fd623
Bypass data tree generation on empty merge

A merge operation may end up not introducing any child nodes. Current
code forces a mutable/immutable cycle. This may end up copying maps or
creating a TrieMap snapshot -- which is not then modified and directly
reused.

This introduces a simple check and a shortcut, which just creates a new
metadata node.

Change-Id: I3fe4d07a139986d473a6bf55a2b40ff4350bd699
Signed-off-by: Robert Varga <rovarga@cisco.com>
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/tree/NormalizedNodeContainerModificationStrategy.java