commit | 703527a65ba4d389ad2c93310363d7ff9352a281 | [log] [tgz] |
---|---|---|
author | sebdet <sebastien.determe@intl.att.com> | Thu Apr 23 15:11:43 2020 +0200 |
committer | sebdet <sebastien.determe@intl.att.com> | Thu Apr 23 15:11:43 2020 +0200 |
tree | a59eb43109e5d90dd3bcd0c75d6556ece9395b1a | |
parent | c72d88555f0fb4d408d1d50be490c21982af7f33 [diff] |
Fix bugs reported by sonar Fix bugs reported by sonar as critical, major, ... Issue-ID: CLAMP-841 Signed-off-by: sebdet <sebastien.determe@intl.att.com> 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 b1aa4ad..418d3c2 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 @@ 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);