aboutsummaryrefslogtreecommitdiffstats
path: root/profiles
diff options
context:
space:
mode:
Diffstat (limited to 'profiles')
-rw-r--r--profiles/command/pom.xml2
-rw-r--r--profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/OpenCommandShellCmd.java24
-rw-r--r--profiles/http/pom.xml2
-rw-r--r--profiles/pom.xml2
-rw-r--r--profiles/snmp/pom.xml2
5 files changed, 18 insertions, 14 deletions
diff --git a/profiles/command/pom.xml b/profiles/command/pom.xml
index 673cd985..b40cf3e1 100644
--- a/profiles/command/pom.xml
+++ b/profiles/command/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.onap.cli</groupId>
<artifactId>cli-profiles</artifactId>
- <version>2.0.5</version>
+ <version>2.0.6</version>
</parent>
<artifactId>cli-profiles-command</artifactId>
diff --git a/profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/OpenCommandShellCmd.java b/profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/OpenCommandShellCmd.java
index 69987d9b..8e94db85 100644
--- a/profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/OpenCommandShellCmd.java
+++ b/profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/OpenCommandShellCmd.java
@@ -138,7 +138,7 @@ public class OpenCommandShellCmd extends OnapCommand {
cwd);
try {
pr.run();
- } catch (InterruptedException | IOException e) {
+ } catch (Exception e) {
throw new OnapCommandExecutionFailed(this.getName(), e);
}
@@ -251,21 +251,25 @@ public class OpenCommandShellCmd extends OnapCommand {
bodyProcessedLine += processedPattern.substring(currentIdx);
break;
}
- int idxE = idxS + 2; // %s
+
+ int idxEnd = idxS + 2; // %s
+
try {
- Object value = values.get(positionalIdx);
- String valueS = String.valueOf(value);
- if (value instanceof JSONArray) {
- JSONArray arr = (JSONArray) value;
- if (!arr.isEmpty()) {
- valueS = arr.get(i).toString();
+ Object val = values.get(positionalIdx);
+ String valStr = String.valueOf(val);
+
+ if (val instanceof JSONArray) {
+ JSONArray aJson = (JSONArray) val;
+
+ if (!aJson.isEmpty()) {
+ valStr = aJson.get(i).toString();
} else {
throw new OnapCommandResultEmpty();
}
}
- bodyProcessedLine += processedPattern.substring(currentIdx, idxS) + valueS;
- currentIdx = idxE;
+ bodyProcessedLine += processedPattern.substring(currentIdx, idxS) + valStr;
+ currentIdx = idxEnd;
positionalIdx++;
} catch (OnapCommandResultEmpty e) {
throw e;
diff --git a/profiles/http/pom.xml b/profiles/http/pom.xml
index e6d2bd71..edd00648 100644
--- a/profiles/http/pom.xml
+++ b/profiles/http/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.onap.cli</groupId>
<artifactId>cli-profiles</artifactId>
- <version>2.0.5</version>
+ <version>2.0.6</version>
</parent>
<artifactId>cli-profiles-http</artifactId>
diff --git a/profiles/pom.xml b/profiles/pom.xml
index dac4b47a..b457aebf 100644
--- a/profiles/pom.xml
+++ b/profiles/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.onap.cli</groupId>
<artifactId>cli</artifactId>
- <version>2.0.5</version>
+ <version>2.0.6</version>
</parent>
<artifactId>cli-profiles</artifactId>
diff --git a/profiles/snmp/pom.xml b/profiles/snmp/pom.xml
index cfd5f228..48698580 100644
--- a/profiles/snmp/pom.xml
+++ b/profiles/snmp/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.onap.cli</groupId>
<artifactId>cli-profiles</artifactId>
- <version>2.0.5</version>
+ <version>2.0.6</version>
</parent>
<artifactId>cli-profiles-snmp</artifactId>