summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java2
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java3
2 files changed, 3 insertions, 2 deletions
diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java b/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java
index 2bf1eb16..53a2d042 100644
--- a/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java
@@ -242,7 +242,7 @@ public class OnapHttpCommand extends OnapCommand {
this.output = this.authClient.run(this.getInput());
this.getResult().setOutput(output);
- if (!this.getSuccessStatusCodes().contains(String.valueOf(output.getStatus()))) {
+ if (!this.getSuccessStatusCodes().contains(output.getStatus())) {
throw new OnapCommandExecutionFailed(this.getName(), output.getBody(), output.getStatus());
}
diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java b/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java
index a01516fb..df9c84fc 100644
--- a/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java
@@ -246,7 +246,8 @@ public class OnapCommandSchemaHttpLoader {
if (validate) {
validateHttpSccessCodes(errorList, (List<Object>) valMap.get(key1));
}
- cmd.setSuccessStatusCodes((ArrayList) valMap.get(key1));
+ List<String> list = (ArrayList) valMap.get(key1);
+ cmd.setSuccessStatusCodes(list.stream().map(s -> Integer.parseInt(s)).collect(Collectors.toList()));
break;
case OnapCommandHttpConstants.RESULT_MAP: