aboutsummaryrefslogtreecommitdiffstats
path: root/profiles/command/src
diff options
context:
space:
mode:
Diffstat (limited to 'profiles/command/src')
-rw-r--r--profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/OpenCommandShellCmd.java16
-rw-r--r--profiles/command/src/main/java/org/onap/cli/fw/cmd/schema/OnapCommandSchemaCmdLoader.java1
2 files changed, 9 insertions, 8 deletions
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 dd2c26cd..3bb2606a 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
@@ -163,32 +163,32 @@ public class OpenCommandShellCmd extends OnapCommand {
//Process command
String []cmd = commandLine.toArray(new String []{});
String cwd = this.getWd();
- List <String> envs = new ArrayList<>();
+ List <String> envList = new ArrayList<>();
//add current process environments to sub process
for (Map.Entry<String, String> env: System.getenv().entrySet()) { //NOSONAR
- envs.add(env.getKey() + "=" + env.getValue());
+ envList.add(env.getKey() + "=" + env.getValue());
}
//add oclip specific environment variables
if (this.getExecutionContext() != null) {
- envs.add("OPEN_CLI_REQUEST_ID=" + this.getExecutionContext().getRequestId());
+ envList.add("OPEN_CLI_REQUEST_ID=" + this.getExecutionContext().getRequestId());
if (this.getExecutionContext().getProfile() != null) {
- envs.add("OPEN_CLI_PROFILE=" + this.getExecutionContext().getProfile());
+ envList.add("OPEN_CLI_PROFILE=" + this.getExecutionContext().getProfile());
}
if (OnapCommandRegistrar.getRegistrar().getHost() != null) {
- envs.add("OPEN_CLI_RPC_HOST=" + OnapCommandRegistrar.getRegistrar().getHost());
- envs.add("OPEN_CLI_RPC_PORT=" + OnapCommandRegistrar.getRegistrar().getPort());
+ envList.add("OPEN_CLI_RPC_HOST=" + OnapCommandRegistrar.getRegistrar().getHost());
+ envList.add("OPEN_CLI_RPC_PORT=" + OnapCommandRegistrar.getRegistrar().getPort());
}
}
for (String env: this.getEnvs().keySet()) {
- envs.add(env + "=" + this.getEnvs().get(env));
+ envList.add(env + "=" + this.getEnvs().get(env));
}
ProcessRunner pr = new ProcessRunner(
cmd,
- (!envs.isEmpty()) ? envs.toArray(new String []{}) : null,
+ (!envList.isEmpty()) ? envList.toArray(new String []{}) : null,
cwd);
FileOutputStream stdoutStream = null;
FileOutputStream stderrStream = null;
diff --git a/profiles/command/src/main/java/org/onap/cli/fw/cmd/schema/OnapCommandSchemaCmdLoader.java b/profiles/command/src/main/java/org/onap/cli/fw/cmd/schema/OnapCommandSchemaCmdLoader.java
index 1eeadecc..2d408065 100644
--- a/profiles/command/src/main/java/org/onap/cli/fw/cmd/schema/OnapCommandSchemaCmdLoader.java
+++ b/profiles/command/src/main/java/org/onap/cli/fw/cmd/schema/OnapCommandSchemaCmdLoader.java
@@ -98,6 +98,7 @@ public class OnapCommandSchemaCmdLoader {
case OnapCommandCmdConstants.PASS_CODE:
cmd.setPassCodes((ArrayList) valMap.get(key1));
break;
+ default : // Do nothing
}
}
}