Update ChoiceSchemaNode design
[yangtools.git] / yang / yang-model-util / src / main / java / org / opendaylight / yangtools / yang / model / util / SchemaContextUtil.java
index 650ab65e6342004d1a8105522af25b1143965a2c..06ae0d090faf05c41b0a53e9deb303af5bdfd622 100644 (file)
@@ -424,7 +424,7 @@ public final class SchemaContextUtil {
 
             if (foundNode == null) {
                 // fallback that tries to map into one of the child cases
-                for (final ChoiceCaseNode caseNode : ((ChoiceSchemaNode) parent).getCases()) {
+                for (final ChoiceCaseNode caseNode : ((ChoiceSchemaNode) parent).getCases().values()) {
                     final DataSchemaNode maybeChild = caseNode.getDataChildByName(current);
                     if (maybeChild != null) {
                         foundNode = findNodeIn(maybeChild, nextPath);