From: Jozef Gloncak Date: Fri, 25 Jul 2014 05:48:29 +0000 (+0200) Subject: ControllerContext.dataNodeChildByQName method refactoring X-Git-Tag: release/helium~375^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=f21247cc587c0a5155cee4e89e2d22cd2e53105d ControllerContext.dataNodeChildByQName method refactoring ControllerContext.dataNodeChildByQName() is used only in childByQName() methods with DataNodeContainer input parameters: - ContainerSchemaNode - ListSchemaNode - Module Therefore child node of these DataNodeContainers can't be ChoiceCaseNode (because it can be only child node of ChoiceNode) and original branch >if (node instanceof ChoiceCaseNode)< couldn't be executed. I think that it was typo. Change-Id: Ieb85ad8acaf047b47813542d8968c399a4e30b50 Signed-off-by: Jozef Gloncak --- diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/ControllerContext.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/ControllerContext.java index dad7a2cda2..f8bcbe3c61 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/ControllerContext.java +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/ControllerContext.java @@ -508,9 +508,9 @@ public class ControllerContext implements SchemaContextListener { DataSchemaNode ret = container.getDataChildByName(name); if (ret == null) { for (final DataSchemaNode node : container.getChildNodes()) { - if ((node instanceof ChoiceCaseNode)) { - final ChoiceCaseNode caseNode = ((ChoiceCaseNode) node); - DataSchemaNode childByQName = ControllerContext.childByQName(caseNode, name); + if ((node instanceof ChoiceNode)) { + final ChoiceNode choiceNode = ((ChoiceNode) node); + DataSchemaNode childByQName = ControllerContext.childByQName(choiceNode, name); if (childByQName != null) { return childByQName; }