[SDC-135] - no properties parent
authorruty slominsky <rs282j@att.com>
Sun, 16 Jul 2017 11:07:42 +0000 (14:07 +0300)
committerruty slominsky <rs282j@att.com>
Sun, 16 Jul 2017 11:25:12 +0000 (14:25 +0300)
Change-Id: I529ce49a434f0e06cb94a6637736677765ba68b1
Signed-off-by: ruty slominsky <rs282j@att.com>
src/main/java/org/openecomp/sdc/toscaparser/api/elements/CapabilityTypeDef.java

index 03e2c45..2994fa8 100644 (file)
@@ -49,13 +49,15 @@ public class CapabilityTypeDef extends StatefulEntityType {
                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));
+                           }
+                                       }
                                }
                        }
                }