summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/onap/pomba/contextbuilder/sdnc/util/RestUtil.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/org/onap/pomba/contextbuilder/sdnc/util/RestUtil.java b/src/main/java/org/onap/pomba/contextbuilder/sdnc/util/RestUtil.java
index 0353661..bd073c7 100644
--- a/src/main/java/org/onap/pomba/contextbuilder/sdnc/util/RestUtil.java
+++ b/src/main/java/org/onap/pomba/contextbuilder/sdnc/util/RestUtil.java
@@ -218,6 +218,9 @@ public class RestUtil {
Object jsonInput = JsonUtils.jsonToObject(sdncResponse);
Chainr chainr = Chainr.fromSpec(jsonSpec);
Object transObject = chainr.transform(jsonInput);
+ if (null == transObject) {
+ return new ModelContext();
+ }
Gson gson = new Gson();
return gson.fromJson(JsonUtils.toPrettyJsonString(transObject), ModelContext.class);