aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaLoader.java23
1 files changed, 10 insertions, 13 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaLoader.java b/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaLoader.java
index 032dc162..a5c0826d 100644
--- a/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaLoader.java
+++ b/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaLoader.java
@@ -92,9 +92,9 @@ import org.yaml.snakeyaml.Yaml;
public class OnapCommandSchemaLoader {
- private OnapCommandSchemaLoader() {
- // As per the java guidelines
- }
+ private OnapCommandSchemaLoader() {
+ // As per the java guidelines
+ }
/**
* Validates schema version.
@@ -341,12 +341,11 @@ public class OnapCommandSchemaLoader {
break;
case IS_OPTIONAL:
- if (validate) {
- if (!OnapCommandUtils.validateBoolean(String.valueOf(parameter.get(key2)))) {
- exceptionList.add(OnapCommandUtils.invalidBooleanValueMessage(parameter.get(NAME),
- IS_SECURED, parameter.get(key2)));
- }
+ if (validate && !OnapCommandUtils.validateBoolean(String.valueOf(parameter.get(key2)))) {
+ exceptionList.add(OnapCommandUtils.invalidBooleanValueMessage(parameter.get(NAME),
+ IS_SECURED, parameter.get(key2)));
}
+
if (BOOLEAN_TRUE.equalsIgnoreCase(String.valueOf(parameter.get(key2)))) {
param.setOptional(true);
} else {
@@ -370,11 +369,9 @@ public class OnapCommandSchemaLoader {
break;
case IS_INCLUDE:
- if (validate) {
- if (!OnapCommandUtils.validateBoolean(String.valueOf(parameter.get(key2)))) {
- exceptionList.add(OnapCommandUtils.invalidBooleanValueMessage(parameter.get(NAME),
- IS_INCLUDE, parameter.get(key2)));
- }
+ if (validate && !OnapCommandUtils.validateBoolean(String.valueOf(parameter.get(key2)))) {
+ exceptionList.add(OnapCommandUtils.invalidBooleanValueMessage(parameter.get(NAME),
+ IS_INCLUDE, parameter.get(key2)));
}
if (BOOLEAN_TRUE.equalsIgnoreCase(String.valueOf(parameter.get(key2)))) {