summaryrefslogtreecommitdiffstats
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-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
}