Remove EffectiveModelContext{Listener,Provider}
[yangtools.git] / data / yang-data-tree-ri / src / main / java / org / opendaylight / yangtools / yang / data / tree / impl / InMemoryDataTreeModification.java
index f3fa3af10e7fd685e1c4b312e4b62ed791c6b162..6607027197e2c9238143f829a47bbdc231582ed0 100644 (file)
@@ -27,12 +27,10 @@ import org.opendaylight.yangtools.yang.data.tree.api.SchemaValidationFailedExcep
 import org.opendaylight.yangtools.yang.data.tree.impl.node.TreeNode;
 import org.opendaylight.yangtools.yang.data.tree.impl.node.Version;
 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
-import org.opendaylight.yangtools.yang.model.api.EffectiveModelContextProvider;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-final class InMemoryDataTreeModification extends AbstractCursorAware implements CursorAwareDataTreeModification,
-        EffectiveModelContextProvider {
+final class InMemoryDataTreeModification extends AbstractCursorAware implements CursorAwareDataTreeModification {
     private static final Logger LOG = LoggerFactory.getLogger(InMemoryDataTreeModification.class);
 
     private static final byte STATE_OPEN    = 0;
@@ -90,8 +88,8 @@ final class InMemoryDataTreeModification extends AbstractCursorAware implements
     }
 
     @Override
-    public EffectiveModelContext getEffectiveModelContext() {
-        return snapshot.getEffectiveModelContext();
+    public EffectiveModelContext modelContext() {
+        return snapshot.modelContext();
     }
 
     @Override
@@ -214,8 +212,7 @@ final class InMemoryDataTreeModification extends AbstractCursorAware implements
         if (newRoot == null) {
             throw new IllegalStateException("Data tree root is not present, possibly removed by previous modification");
         }
-        return new InMemoryDataTreeSnapshot(snapshot.getEffectiveModelContext(), newRoot, strategyTree)
-            .newModification();
+        return new InMemoryDataTreeSnapshot(snapshot.modelContext(), newRoot, strategyTree).newModification();
     }
 
     Version getVersion() {