BUG-1513: introduce ChoiceSchemaNode
[yangtools.git] / yang / yang-model-util / src / main / java / org / opendaylight / yangtools / yang / model / util / SchemaContextUtil.java
index c0ac168135eaa73a52ea9b1dbd02284e663c170c..10abb048d51eb9916ad666a72eb4dc75f92f4ff7 100644 (file)
@@ -20,7 +20,7 @@ import java.util.Set;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.model.api.ChoiceNode;
+import org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
@@ -388,8 +388,8 @@ public final class SchemaContextUtil {
             }
         }
 
-        if (foundNode == null && parent instanceof ChoiceNode) {
-            foundNode = ((ChoiceNode) parent).getCaseNodeByName(current);
+        if (foundNode == null && parent instanceof ChoiceSchemaNode) {
+            foundNode = ((ChoiceSchemaNode) parent).getCaseNodeByName(current);
             if (foundNode != null && nextPath.iterator().hasNext()) {
                 foundNode = findNodeIn(foundNode, nextPath);
             }