summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2019-08-08 17:02:38 +0300
committerIttay Stern <ittay.stern@att.com>2019-08-12 05:38:28 +0000
commitec826258014e77bb8073dcf0a4322afa1ad73099 (patch)
tree3cf87dd2cc67524fe18e331400acf9f17bfae7bf /vid-app-common/src/main
parentad706d09442b1b1b6d2d8cff4042867ceea6b56f (diff)
return MsoResponseWrapper with null body in case of null response
Issue-ID: VID-378 Signed-off-by: Eylon Malin <eylon.malin@intl.att.com> Change-Id: Ia05237264557634f18ed868904cc68350a312fc1
Diffstat (limited to 'vid-app-common/src/main')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/MsoUtil.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoUtil.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoUtil.java
index 5171b7ac8..626816f7f 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoUtil.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoUtil.java
@@ -49,7 +49,8 @@ public class MsoUtil {
if (httpResponse.getRawBody() != null) {
try {
T body = httpResponse.getBody();
- String entityStr = body instanceof String ? (String) body : JACKSON_OBJECT_MAPPER.writeValueAsString(httpResponse.getBody());
+ String entityStr = (body instanceof String || body==null) ? (String) body :
+ JACKSON_OBJECT_MAPPER.writeValueAsString(httpResponse.getBody());
msoResponseWrapper.setEntity(entityStr);
} catch(JsonProcessingException e) {
ExceptionUtils.rethrow(e);