From: MichaelMorris Date: Wed, 25 Oct 2023 14:49:29 +0000 (+0100) Subject: Fix adding null schema to non list properties X-Git-Tag: 1.13.6~11 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;ds=sidebyside;h=6b58f89d940d56bfda38b5f86ef5a86ee29f80cf;hp=133d8bbc63891a9c169b002c03be9ec27f8bc486;p=sdc.git Fix adding null schema to non list properties Signed-off-by: MichaelMorris Issue-ID: SDC-4668 Change-Id: I815ff21b8394b858627f7798d7fdcd5326b6eb6b --- diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/CommonCsarGenerator.java b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/CommonCsarGenerator.java index d5c64db76b..0e3328f4d8 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/CommonCsarGenerator.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/CommonCsarGenerator.java @@ -748,7 +748,7 @@ public class CommonCsarGenerator { private Object getValue(final String key, Map value) { final String mappedKey = mapKey(key); - if (mappedKey.equals("schemaType")) { + if (mappedKey.equals("schemaType") && value.get(mappedKey) != null) { return Collections.singletonMap("type", value.get(mappedKey)); } return value.get(mappedKey);