aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/openecomp/sdc/toscaparser/api/elements/CapabilityTypeDef.java16
1 files changed, 9 insertions, 7 deletions
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 @@ 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));
+ }
+ }
}
}
}