summaryrefslogtreecommitdiffstats
path: root/framework/src/main/java/org
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-05-02 14:33:03 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-05-02 14:33:03 +0530
commitb6eefde92eea6352933679bf42bc62bb9e416742 (patch)
tree387f30a2b59d0f53d85e6cf9ccd46682ea02bf8d /framework/src/main/java/org
parent61ec9ff55bdbda36323fbf3af2be3148d4b6efce (diff)
Add type check for Schema info obj compartion
Issue-ID: CLI-106 Change-Id: Ie650896c0506632347164c57b23f3d264497a62a Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'framework/src/main/java/org')
-rw-r--r--framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaInfo.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaInfo.java b/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaInfo.java
index 2cd9458a..d4776e16 100644
--- a/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaInfo.java
+++ b/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaInfo.java
@@ -145,6 +145,13 @@ public class OnapCommandSchemaInfo implements Comparable<OnapCommandSchemaInfo>
@Override
public boolean equals(Object obj) {
+ if (obj == null)
+ return false;
+
+ if (this.getClass() != obj.getClass())
+ return false;
+
return this.compareTo((OnapCommandSchemaInfo) obj) == 0;
}
+
}