Remove EffectiveSchemaContext.resolveSchemaContext() 34/65034/5
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 2 Nov 2017 09:32:17 +0000 (10:32 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 3 Nov 2017 15:46:02 +0000 (16:46 +0100)
This method has been deprecated in favor of SimpleSchemaContext's
forModule() static factory method. Remove it.

Change-Id: Idf4b4834d98b84ffcd8bf91046b9dd3856183d61
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/EffectiveSchemaContext.java
yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/EffectiveSchemaContextTest.java

index 13e7700cf423852aab67b7153782607ec90e351d..b284ffa602d9bb6cf3122cf1f16902e6c23d0c3c 100644 (file)
@@ -14,7 +14,6 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 import org.opendaylight.yangtools.yang.model.api.Module;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.ModuleStatement;
@@ -45,16 +44,6 @@ public final class EffectiveSchemaContext extends SimpleSchemaContext {
         return new EffectiveSchemaContext(modules, rootDeclaredStatements, rootEffectiveStatements);
     }
 
-    /**
-     * Resolve SchemaContext for a set of modules.
-     *
-     * @deprecated Use {@link SimpleSchemaContext#forModules(Set)} instead.
-     */
-    @Deprecated
-    public static SchemaContext resolveSchemaContext(final Set<Module> modules) {
-        return SimpleSchemaContext.forModules(modules);
-    }
-
     @VisibleForTesting
     public List<DeclaredStatement<?>> getRootDeclaredStatements() {
         return rootDeclaredStatements;
index 702081e2f86f2c81875be6236e878a082ccbb19e..6fd4f9d8a78c41f8206f4c4f878a743eb457f3a0 100644 (file)
@@ -35,6 +35,7 @@ import org.opendaylight.yangtools.yang.model.api.Status;
 import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
 import org.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException;
 import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource;
+import org.opendaylight.yangtools.yang.model.util.SimpleSchemaContext;
 import org.opendaylight.yangtools.yang.parser.rfc6020.repo.YangStatementStreamSource;
 import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
 import org.opendaylight.yangtools.yang.parser.stmt.reactor.CrossSourceStatementReactor;
@@ -103,7 +104,7 @@ public class EffectiveSchemaContextTest {
         assertEquals(3,((EffectiveSchemaContext) schemaContext).getRootEffectiveStatements().size());
 
         final Set<Module> modules = schemaContext.getModules();
-        final SchemaContext copiedSchemaContext = EffectiveSchemaContext.resolveSchemaContext(modules);
+        final SchemaContext copiedSchemaContext =  SimpleSchemaContext.forModules(modules);
         assertNotNull(copiedSchemaContext);
         assertEquals(modules, copiedSchemaContext.getModules());
     }