diff options
author | frank feng <frank.fengchong@huawei.com> | 2023-09-06 14:24:11 +0800 |
---|---|---|
committer | frank feng <frank.fengchong@huawei.com> | 2023-09-06 14:39:30 +0800 |
commit | 47ef15fef5cdd02f99ce1546c557fe8c74591d46 (patch) | |
tree | 7ad1d9ef275a3c04a3dfdb036fef20d68df4adab /yang-comparator | |
parent | 1e401fb559a1d7cdf9e9210123969ddb884f8e67 (diff) |
fix bug for yang comparator and refactor yang compiler
Issue-ID: MODELING-680
Change-Id: I3a04b24d6b02aff2a376c95d6f7508294b65aa57
Signed-off-by: frank feng <frank.fengchong@huawei.com>
Diffstat (limited to 'yang-comparator')
-rw-r--r-- | yang-comparator/src/main/java/org/onap/modeling/yangkit/comparator/CommonYangStatementComparator.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/yang-comparator/src/main/java/org/onap/modeling/yangkit/comparator/CommonYangStatementComparator.java b/yang-comparator/src/main/java/org/onap/modeling/yangkit/comparator/CommonYangStatementComparator.java index 8b03304..8be269e 100644 --- a/yang-comparator/src/main/java/org/onap/modeling/yangkit/comparator/CommonYangStatementComparator.java +++ b/yang-comparator/src/main/java/org/onap/modeling/yangkit/comparator/CommonYangStatementComparator.java @@ -370,6 +370,12 @@ public class CommonYangStatementComparator<T extends YangStatement> extends Abst * @return true or false */ public static boolean yangStatementIsEqual(YangStatement left, YangStatement right) { + if ((null == left) || (null == right)) { + if ((null == left) && (null == right)) { + return true; + } + return false; + } if ((left instanceof SchemaNode) && (right instanceof SchemaNode)) { SchemaNode leftSchemaNode = (SchemaNode) left; SchemaNode rightSchemaNode = (SchemaNode) right; |