From b6eefde92eea6352933679bf42bc62bb9e416742 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Wed, 2 May 2018 14:33:03 +0530 Subject: Add type check for Schema info obj compartion Issue-ID: CLI-106 Change-Id: Ie650896c0506632347164c57b23f3d264497a62a Signed-off-by: Kanagaraj Manickam k00365106 --- .../main/java/org/onap/cli/fw/schema/OnapCommandSchemaInfo.java | 7 +++++++ 1 file changed, 7 insertions(+) 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 @Override public boolean equals(Object obj) { + if (obj == null) + return false; + + if (this.getClass() != obj.getClass()) + return false; + return this.compareTo((OnapCommandSchemaInfo) obj) == 0; } + } -- cgit 1.2.3-korg