aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/main')
-rw-r--r--framework/src/main/java/org/onap/cli/fw/input/OnapCommandParameter.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/input/OnapCommandParameter.java b/framework/src/main/java/org/onap/cli/fw/input/OnapCommandParameter.java
index 23263c12..618c321c 100644
--- a/framework/src/main/java/org/onap/cli/fw/input/OnapCommandParameter.java
+++ b/framework/src/main/java/org/onap/cli/fw/input/OnapCommandParameter.java
@@ -301,13 +301,10 @@ public class OnapCommandParameter {
throw new OnapCommandInvalidParameterValue(this.getName());
}
} else if (OnapCommandParameterType.BOOL.equals(parameterType)) {
- if (!(value instanceof Boolean)) {
- if (value instanceof String) {
- value = Boolean.valueOf((String)value);
- } else {
- throw new OnapCommandInvalidParameterValue(this.getName());
- }
-
+ if (value instanceof String) {
+ value = Boolean.valueOf((String)value);
+ } else if (!(value instanceof Boolean)) {
+ throw new OnapCommandInvalidParameterValue(this.getName());
}
}
this.value = value;