diff options
author | Tait,Trevor(rt0435) <rtait@amdocs.com> | 2019-02-06 14:31:44 -0500 |
---|---|---|
committer | Tait,Trevor(rt0435) <rtait@amdocs.com> | 2019-02-06 15:33:05 -0500 |
commit | 194ade66a442423398000b9c9f9fe312e3c7844b (patch) | |
tree | de9539ace43c327b7f88330a1e49e4e51c8d8926 /src/main/java/org/onap | |
parent | 769cb4c222fb6123bda3ae12abadd73cba7bdbb5 (diff) |
Fix: NPE if there is no configuration ID
Issue-ID: LOG-778
Change-Id: I6c6c5d99ac911e47020ef6df99543efaf111b96e
Signed-off-by: Tait,Trevor(rt0435) <rtait@amdocs.com>
Diffstat (limited to 'src/main/java/org/onap')
-rw-r--r-- | src/main/java/org/onap/pomba/contextbuilder/sdnc/util/RestUtil.java | 3 |
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 5065da3..b35f9f4 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 @@ -230,6 +230,9 @@ public class RestUtil { Object providedConfigurationsInput = JsonUtils.jsonToObject(sdncResponse); Chainr providedConfigurations = Chainr.fromSpec(providedConfigurationsSpec); Object providedConfigurationsObject = providedConfigurations.transform(providedConfigurationsInput); + if (null == providedConfigurationsObject) { + return pnfList; + } Gson gson = new Gson(); JsonElement jsonElement = gson.toJsonTree(providedConfigurationsObject); JsonObject jsonObject = (JsonObject) jsonElement; |