Fix typo and add more descriptive error
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / sal / dom / broker / impl / DataReaderRouter.xtend
index 504a3d639413f7f6b1b901297bbf215aa9825842..cc44613e448ad520063120f31c481e987f032ee5 100644 (file)
@@ -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.impl
 
 import org.opendaylight.controller.md.sal.common.impl.routing.AbstractDataReadRouter
@@ -78,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);