From: sebdet Date: Thu, 23 Apr 2020 13:11:43 +0000 (+0200) Subject: Fix bugs reported by sonar X-Git-Tag: 5.0.6~7^2~1 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=703527a65ba4d389ad2c93310363d7ff9352a281;p=clamp.git Fix bugs reported by sonar Fix bugs reported by sonar as critical, major, ... Issue-ID: CLAMP-841 Signed-off-by: sebdet Change-Id: I91723b83289e25d6e27b0c925107e50314f441fc --- diff --git a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java index b1aa4ad1..418d3c2c 100644 --- a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java +++ b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java @@ -309,7 +309,7 @@ public class OperationalPolicyRepresentationBuilder { if (TYPE_LIST.equalsIgnoreCase(type)) { property.addProperty(TYPE, "array"); - if (cdsProperty.get(PROPERTIES) != null) { + if (cdsProperty != null && cdsProperty.get(PROPERTIES) != null) { JsonObject dataObject = new JsonObject(); addDataFields(cdsProperty.get(PROPERTIES).getAsJsonObject(), dataObject);