From f21247cc587c0a5155cee4e89e2d22cd2e53105d Mon Sep 17 00:00:00 2001 From: Jozef Gloncak Date: Fri, 25 Jul 2014 07:48:29 +0200 Subject: [PATCH] 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 --- .../controller/sal/restconf/impl/ControllerContext.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.36.6