aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/main/java/org/onap
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-03-09 07:42:24 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-03-09 07:42:24 +0530
commitdd2b7b8ef7a694a82e52ea31bd44e89618ac6b8a (patch)
tree605952a1db93635e2c452972864212084efe1735 /framework/src/main/java/org/onap
parent47c1f1f559e4c69fff6a91d2445e837f54da3a1f (diff)
Make bool param set by string value
Issue-ID: CLI-99 Change-Id: I3778e848dc824c1a7145a0fcf8cb3e4b7af695ab Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'framework/src/main/java/org/onap')
-rw-r--r--framework/src/main/java/org/onap/cli/fw/input/OnapCommandParameter.java7
1 files changed, 6 insertions, 1 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 31897850..8cc7b454 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
@@ -292,7 +292,12 @@ public class OnapCommandParameter {
}
} else if (OnapCommandParameterType.BOOL.equals(parameterType)) {
if (!(value instanceof Boolean)) {
- throw new OnapCommandInvalidParameterValue(this.getName());
+ if (value instanceof String) {
+ value = Boolean.valueOf((String)value);
+ } else {
+ throw new OnapCommandInvalidParameterValue(this.getName());
+ }
+
}
}
this.value = value;