summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicContext.java6
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 129c08526..98cf7e05e 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() {