Skip to content

Commit ba5f5d9

Browse files
author
Olha Yelisieieva
committed
Issue-16: Fixing NPE during ComposedModel validation in InheritanceChainPropertiesValidator
1 parent 7fd1868 commit ba5f5d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/com/github/sylvainlaurent/maven/swaggervalidator/semantic/validator/definition/InheritanceChainPropertiesValidator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ public void validate(RefModelWrapper refModelWrapper) {
6868
@Override
6969
public void validate(ComposedModelWrapper composedModelWrapper) {
7070
if (composedModelWrapper != root) {
71-
Map<String, Property> childProperties = composedModelWrapper.getChild().getProperties() != null ?
72-
composedModelWrapper.getChild().getProperties() :
73-
Collections.<String, Property>emptyMap();
71+
Map<String, Property> childProperties = composedModelWrapper.getChild()== null || composedModelWrapper.getChild().getProperties() == null ?
72+
Collections.<String, Property>emptyMap() :
73+
composedModelWrapper.getChild().getProperties();
7474
parentProperties.addAll(childProperties.keySet());
7575
}
7676

0 commit comments

Comments
 (0)