X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fdom%2Fbroker%2Futil%2FYangDataOperations.xtend;h=d80e405b4e05dc7df3bd9ed5c9de3610644e7b18;hb=efa5be8f930f3eda7094c314e22347868b9db173;hp=f37fb0e5c03e1743b3fefa34ba454ccbe0668d89;hpb=acb48de64c98d7a4cc2c523074b7f900357f61f0;p=controller.git diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/util/YangDataOperations.xtend b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/util/YangDataOperations.xtend index f37fb0e5c0..d80e405b4e 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/util/YangDataOperations.xtend +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/util/YangDataOperations.xtend @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ package org.opendaylight.controller.sal.dom.broker.util import org.opendaylight.yangtools.yang.data.api.CompositeNode @@ -31,12 +38,6 @@ class YangDataOperations { throw new IllegalArgumentException("Supplied node is not data node container."); } - private def static checkConfigurational(DataSchemaNode node, boolean config) { - if (config) { - checkArgument(node.configuration, "Supplied composite node is not configurational."); - } - } - private static dispatch def Iterable> mergeMultiple(LeafSchemaNode node, List> original, List> modified, boolean configurational) { checkArgument(original.size === 1); @@ -63,7 +64,7 @@ class YangDataOperations { if(node.keyDefinition === null || node.keyDefinition.empty) { return modified; - } + } val originalMap = (original as List).toIndexMap(node.keyDefinition); val modifiedMap = (modified as List).toIndexMap(node.keyDefinition); @@ -73,7 +74,8 @@ class YangDataOperations { if(originalEntry != null) { originalMap.remove(entry.key); mergedNodes.add(merge(node,originalEntry,entry.value,configurational)); - + } else { + mergedNodes.add(entry.value); } } mergedNodes.addAll(originalMap.values);