Migrate getDataChildByName() users
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / ImmutableNodes.java
index 28310400acea3bfd7692dc8547c14fc9863a4847..5a96515d13da23583dae2dcaee0ee40d7f65f3d9 100644 (file)
@@ -38,10 +38,11 @@ import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
 public final class ImmutableNodes {
+    // FIXME: YANGTOOLS-1074: we do not want this name
     private static final NodeIdentifier SCHEMACONTEXT_NAME = NodeIdentifier.create(SchemaContext.NAME);
 
     private ImmutableNodes() {
-        throw new UnsupportedOperationException("Utilities class should not be instantiated");
+        // Hidden on purpose
     }
 
     public static @NonNull CollectionNodeBuilder<MapEntryNode, MapNode> mapNodeBuilder() {
@@ -238,7 +239,7 @@ public final class ImmutableNodes {
         final Iterator<PathArgument> it = id.getPathArguments().iterator();
         if (it.hasNext()) {
             topLevelElement = it.next();
-            final DataSchemaNode dataChildByName = ctx.getDataChildByName(topLevelElement.getNodeType());
+            final DataSchemaNode dataChildByName = ctx.dataChildByName(topLevelElement.getNodeType());
             checkNotNull(dataChildByName,
                 "Cannot find %s node in schema context. Instance identifier has to start from root", topLevelElement);
             instanceIdToNodes = InstanceIdToNodes.fromSchemaAndQNameChecked(ctx, topLevelElement.getNodeType());