aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/main/java/org/onap
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-04-26 15:31:17 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-04-26 15:31:17 +0530
commit3fc42e430b3f1cf95e48aa8f744edb9d823fff86 (patch)
tree9f483056b72f8ecbfcb423877c025d07eb9a4b50 /framework/src/main/java/org/onap
parentcefb231b6be16cf461e12e6eb7767ed639610773 (diff)
Combine hierarchy if statements
Issue-ID: CLI-100 Change-Id: I744ffefb28bf292b98a7e1465fb58e55b7bf1aeb 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.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;