aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsubhash kumar singh <subhash.kumar.singh@huawei.com>2018-05-02 14:34:28 +0000
committerGerrit Code Review <gerrit@onap.org>2018-05-02 14:34:28 +0000
commit2b85da5040b5cbd0cc586619b27f8ec4d2f1075c (patch)
tree042f07bd5659aea47983497ac0e10a665d20a574
parent17256954e270f07e6d3b252f378dc7985e14f55e (diff)
parentb6eefde92eea6352933679bf42bc62bb9e416742 (diff)
Merge "Add type check for Schema info obj compartion"
-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;
}
+
}