Memory dump has shown we have multitude of NodeIdentifiers pointing to
the prefix QName. This turns out to be the automatic completion of
missing key leaves. Fix the caller to set the leaf up correctly, thus
sharing the NodeIdentifier instance.
Change-Id: I5fb563a9048f4d48c2a2c5b96b8b9bfd08b867f6
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit
390fbfa3f810ad278d3c55a256bd1deea2ac1bb0)
void apply(final DOMDataWriteTransaction tx, final YangInstanceIdentifier base, final NodeIdentifierWithPredicates routeKey, final DataContainerNode<?> route, final ContainerNode attributes) {
final DataContainerNodeBuilder<NodeIdentifierWithPredicates, MapEntryNode> b = ImmutableNodes.mapEntryBuilder();
b.withNodeIdentifier(routeKey);
+ b.withChild(ImmutableNodes.leafNode(routeKeyLeafIdentifier(), routeKey.getKeyValues().get(routeQName())));
// FIXME: All route children, there should be a utility somewhere to do this
for (final DataContainerChild<? extends PathArgument, ?> child : route.getValue()) {