summaryrefslogtreecommitdiffstats
path: root/profiles/http/src
diff options
context:
space:
mode:
Diffstat (limited to 'profiles/http/src')
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandFailedMocoGenerate.java3
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java2
2 files changed, 3 insertions, 2 deletions
diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandFailedMocoGenerate.java b/profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandFailedMocoGenerate.java
index 12a645c4..9d6274ac 100644
--- a/profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandFailedMocoGenerate.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandFailedMocoGenerate.java
@@ -17,12 +17,13 @@
package org.onap.cli.fw.http.error;
import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.error.OnapCommandWarning;
/**
* Invalid data for generating moco json .
*
*/
-public class OnapCommandFailedMocoGenerate extends OnapCommandException {
+public class OnapCommandFailedMocoGenerate extends OnapCommandWarning {
private static final long serialVersionUID = -5386652726982792831L;
diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java b/profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java
index 5cab0a68..d1f88df4 100644
--- a/profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java
@@ -171,7 +171,7 @@ public class OnapCommandHttpUtils {
/**
* In case of empty response body [] or {}
**/
- if (resultHttp.getBody().length() <= 2) {
+ if (resultHttp.getBody() != null && resultHttp.getBody().length() <= 2) {
return result;
}