summaryrefslogtreecommitdiffstats
path: root/framework/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/main/java')
-rw-r--r--framework/src/main/java/org/onap/cli/fw/utils/OnapCommandDiscoveryUtils.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandDiscoveryUtils.java b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandDiscoveryUtils.java
index 2b3cf941..1732772e 100644
--- a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandDiscoveryUtils.java
+++ b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandDiscoveryUtils.java
@@ -246,6 +246,11 @@ public class OnapCommandDiscoveryUtils {
schema.setSchemaURI(resource.getURI().toString());
Object obj = resourceMap.get(OPEN_CLI_SCHEMA_VERSION);
+ if (obj == null) {
+ OnapCommandUtils.LOG.info("Invalid Schema yaml " + schema.getSchemaURI());
+ continue;
+ }
+
schema.setVersion(obj.toString());
if (!schema.getVersion().equalsIgnoreCase(OnapCommandConstants.OPEN_CLI_SCHEMA_VERSION_VALUE_1_0)) {