diff options
author | Ittay Stern <ittay.stern@att.com> | 2019-08-12 07:53:18 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-08-12 07:53:18 +0000 |
commit | 47cc63c50442005b3ac051d4c4e3037139b7f1e5 (patch) | |
tree | 5ccaa1a303df5ff97d384adee3614720e3676a5a | |
parent | b3272c142193cd37f5dae7807e713819885d102d (diff) | |
parent | ec826258014e77bb8073dcf0a4322afa1ad73099 (diff) |
Merge "return MsoResponseWrapper with null body in case of null response"
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/mso/MsoUtil.java | 3 |
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); |