Update MRI projects for Aluminium
[netconf.git] / restconf / restconf-nb-rfc8040 / src / test / java / org / opendaylight / restconf / nb / rfc8040 / TestRestconfUtils.java
index 4249b206c8da82b3f8f9a10f5edfff7d398b8fe7..9fd81a2f394add87c8f03602f16f17e2e9fbd82d 100644 (file)
@@ -32,9 +32,9 @@ import org.opendaylight.yangtools.yang.data.impl.schema.NormalizedNodeResult;
 import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
 import org.opendaylight.yangtools.yang.model.api.ListSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.RpcDefinition;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.api.SchemaNode;
 import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
 import org.slf4j.Logger;
@@ -51,7 +51,8 @@ public final class TestRestconfUtils {
     }
 
     @SuppressWarnings("checkstyle:IllegalCatch")
-    public static SchemaContext loadSchemaContext(final String yangPath, final SchemaContext schemaContext) {
+    public static EffectiveModelContext loadSchemaContext(final String yangPath,
+            final EffectiveModelContext schemaContext) {
         try {
             Preconditions.checkArgument(yangPath != null, "Path can not be null.");
             Preconditions.checkArgument(!yangPath.isEmpty(), "Path can not be empty.");
@@ -72,7 +73,7 @@ public final class TestRestconfUtils {
 
     @SuppressWarnings("checkstyle:IllegalCatch")
     public static NormalizedNodeContext loadNormalizedContextFromXmlFile(final String pathToInputFile,
-            final String uri, final SchemaContext schemaContext) {
+            final String uri, final EffectiveModelContext schemaContext) {
         final InstanceIdentifierContext<?> iiContext =
                 ParserIdentifier.toInstanceIdentifier(uri, schemaContext, Optional.empty());
         final InputStream inputStream = TestRestconfUtils.class.getResourceAsStream(pathToInputFile);
@@ -109,8 +110,7 @@ public final class TestRestconfUtils {
         final String schemaNodeName = iiContext.getSchemaNode().getQName().getLocalName();
 
         if (!schemaNodeName.equalsIgnoreCase(docRootElm)) {
-            final Collection<DataSchemaNode> children = ((DataNodeContainer) schemaNode).getChildNodes();
-            for (final DataSchemaNode child : children) {
+            for (final DataSchemaNode child : ((DataNodeContainer) schemaNode).getChildNodes()) {
                 if (child.getQName().getLocalName().equalsIgnoreCase(docRootElm)) {
                     schemaNode = child;
                     break;