diff options
-rw-r--r-- | sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicContext.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicContext.java b/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicContext.java index 129c0852..98cf7e05 100644 --- a/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicContext.java +++ b/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicContext.java @@ -298,7 +298,11 @@ public class SvcLogicContext { String jsonString = this.toJsonString(); JsonObject jsonRoot = (JsonObject) jp.parse(jsonString); JsonObject targetJson = jsonRoot.getAsJsonObject(pfx); - return(targetJson.toString()); + if (targetJson == null) { + return(""); + } else { + return(targetJson.toString()); + } } public String toJsonString() { |