commit | 521b3cf11dc9b114fba03ee43582b8e8db58947c | [log] [tgz] |
---|---|---|
author | Vidyashree Rama <vidyashree.rama@huawei.com> | Tue Nov 28 15:38:41 2017 +0530 |
committer | Vidyashree Rama <vidyashree.rama@huawei.com> | Tue Nov 28 15:38:54 2017 +0530 |
tree | 47947aaa34b280fb6aa4f08d389423c6a07a9a20 | |
parent | c2862f018a4b87e53908ad29f6c55558d1f222ee [diff] |
Parent context is reset with null value Change-Id: Ice5f2a447a614587ac4e28b4419582c085f7f077
diff --git a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangNode.java b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangNode.java index 842bca1..48b739e 100644 --- a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangNode.java +++ b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangNode.java
@@ -1026,7 +1026,10 @@ */ public void setParentContext() { if (this instanceof SchemaDataNode) { - parentContext = getParentSchemaContext(this.getParent()); + SchemaContext t = getParentSchemaContext(this.getParent()); + if (t != null) { + parentContext = t; + } // As rpc and anydata node is not leaf holder if (nodeType != RPC_NODE && nodeType != ANYDATA_NODE) {