[SDC-135] - no properties parent
Change-Id: I529ce49a434f0e06cb94a6637736677765ba68b1
Signed-off-by: ruty slominsky <rs282j@att.com>
diff --git a/src/main/java/org/openecomp/sdc/toscaparser/api/elements/CapabilityTypeDef.java b/src/main/java/org/openecomp/sdc/toscaparser/api/elements/CapabilityTypeDef.java
index 03e2c45..2994fa8 100644
--- a/src/main/java/org/openecomp/sdc/toscaparser/api/elements/CapabilityTypeDef.java
+++ b/src/main/java/org/openecomp/sdc/toscaparser/api/elements/CapabilityTypeDef.java
@@ -49,13 +49,15 @@
if(parentProperties != null) {
for(Map.Entry<String,Object> me: parentProperties.entrySet()) {
LinkedHashMap<String,Object> props = (LinkedHashMap<String,Object>)me.getValue();
- for(Map.Entry<String,Object> pe: props.entrySet()) {
- String prop = pe.getKey();
- LinkedHashMap<String,Object> schema = (LinkedHashMap<String,Object>)pe.getValue();
- // add parent property if not overridden by children type
- if(properties == null || properties.get(prop) == null) {
- propsdefs.add(new PropertyDef(prop, null, schema));
- }
+ if (props != null) {
+ for(Map.Entry<String,Object> pe: props.entrySet()) {
+ String prop = pe.getKey();
+ LinkedHashMap<String,Object> schema = (LinkedHashMap<String,Object>)pe.getValue();
+ // add parent property if not overridden by children type
+ if(properties == null || properties.get(prop) == null) {
+ propsdefs.add(new PropertyDef(prop, null, schema));
+ }
+ }
}
}
}