From 6e2b5a9df11eb5a1ae455ff3c7a17ff1ad855b2e Mon Sep 17 00:00:00 2001 From: "Tait,Trevor(rt0435)" Date: Wed, 20 Feb 2019 11:49:35 -0500 Subject: FIX: NPE Issue-ID: LOG-981 Change-Id: I234b639d6c5afa572f86aa17ad9419bf7d839928 Signed-off-by: Tait,Trevor(rt0435) --- src/main/java/org/onap/pomba/contextbuilder/sdnc/util/RestUtil.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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); -- cgit 1.2.3-korg