From 70dac125e796d52b874f4e7f3839f9cf042e0f98 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam Date: Thu, 29 Aug 2019 15:41:53 +0530 Subject: Minor issues fix Issue-ID: CLI-166 Change-Id: I97bd303b4e636bfc53e24732c7c6e4062037909b Signed-off-by: Kanagaraj Manickam k00365106 --- .../java/org/onap/cli/fw/http/error/OnapCommandFailedMocoGenerate.java | 3 ++- .../src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'profiles/http/src/main/java/org') 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; } -- cgit 1.2.3-korg