summaryrefslogtreecommitdiffstats
path: root/framework/src/main
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-09-18 16:13:43 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-09-18 16:13:43 +0530
commitc4eb2182d3d8639158ad9924d7e53cb4fc074208 (patch)
treec85cac18d58e527df4845c2b45460d9b3a49b362 /framework/src/main
parent0b6db3fd771ab6b4fbc75d178afc3a5fb421f934 (diff)
VTP: Fix the vnftest-run cli
Issue-ID: VNFSDK-305 Change-Id: I833114b975b4d44b1eab3b9c2fa34dc3fdb9971d Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'framework/src/main')
-rw-r--r--framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java
index 879e6289..862e328b 100644
--- a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java
+++ b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java
@@ -262,7 +262,11 @@ public class OnapCommandUtils {
} else if (OnapCommandParameterType.MAP.equals(param.getParameterType())) {
try {
String value = new ObjectMapper().writeValueAsString(params.get(paramName).getValue());
- result += line.substring(currentIdx, idxS - 1) + value;
+ if ((idxS == 0) && (currentIdx == 0)) {
+ result = value;
+ } else {
+ result += line.substring(currentIdx, idxS - 1) + value;
+ }
} catch (JsonProcessingException e) { // NOSONAR
//never occur as map is coverted to json string here
}