Merge "Bug 2843 - Restconf JSON PUT cannot update/create network-topology configurati...
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / tree / InMemoryDataTree.java
index 0ed17c685a8aef53900a0b6a9fb71448f967a102..0f680fddadf30a6cf11410bf7ef2cb31e069c14a 100644 (file)
@@ -19,7 +19,6 @@ import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataValidationFailedException;
-import org.opendaylight.yangtools.yang.data.api.schema.tree.ModificationType;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.spi.TreeNode;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.slf4j.Logger;
@@ -54,7 +53,6 @@ final class InMemoryDataTree implements DataTree {
     public synchronized void setSchemaContext(final SchemaContext newSchemaContext) {
         Preconditions.checkNotNull(newSchemaContext);
 
-        LOG.info("Attempting to install schema contexts");
         LOG.debug("Following schema contexts will be attempted {}", newSchemaContext);
 
         final SchemaAwareApplyOperation operation = SchemaAwareApplyOperation.from(newSchemaContext);
@@ -86,7 +84,7 @@ final class InMemoryDataTree implements DataTree {
         final InMemoryDataTreeModification m = (InMemoryDataTreeModification)modification;
         final ModifiedNode root = m.getRootModification();
 
-        if (root.getType() == ModificationType.UNMODIFIED) {
+        if (root.getOperation() == LogicalOperation.NONE) {
             return new NoopDataTreeCandidate(PUBLIC_ROOT_PATH, root);
         }