From 47ef15fef5cdd02f99ce1546c557fe8c74591d46 Mon Sep 17 00:00:00 2001 From: frank feng Date: Wed, 6 Sep 2023 14:24:11 +0800 Subject: fix bug for yang comparator and refactor yang compiler Issue-ID: MODELING-680 Change-Id: I3a04b24d6b02aff2a376c95d6f7508294b65aa57 Signed-off-by: frank feng --- .../modeling/yangkit/comparator/CommonYangStatementComparator.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'yang-comparator/src/main') 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 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; -- cgit 1.2.3-korg