Fix typo and add more descriptive error 38/5038/3
authorRobert Varga <rovarga@cisco.com>
Thu, 30 Jan 2014 18:07:22 +0000 (19:07 +0100)
committerRobert Varga <rovarga@cisco.com>
Sat, 1 Feb 2014 07:51:58 +0000 (08:51 +0100)
When comparing keys, also provide a hint to the node which violated the
key constraint.

Change-Id: I02a9ba3c887bcbc3af34fe770f662e627c3a4414
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/impl/DataReaderRouter.xtend

index 3723671..cc44613 100644 (file)
@@ -85,7 +85,7 @@ class DataReaderRouter extends AbstractDataReadRouter<InstanceIdentifier, Compos
             val simpleNode = node.getSimpleNodesByName(keyValue.key);
             if(simpleNode !== null && !simpleNode.empty) {
                 checkState(simpleNode.size <= 1,"Only one simple node for key $s is allowed in node $s",keyValue.key,node);
-                checkState(simpleNode.get(0).value == keyValue.value,"Key node must equals to instance identifier value");
+                checkState(simpleNode.get(0).value == keyValue.value,"Key node must equal to instance identifier value in node $s",node);
                 ret.put(keyValue.key,simpleNode.get(0));
             }
             val compositeNode = node.getCompositesByName(keyValue.key);