add defensive null check

This commit is contained in:
russellb337 2015-08-10 13:58:02 -07:00
parent 0a8fb1e532
commit ae4b4979a7

View File

@ -423,10 +423,12 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
} }
//need to propagate path level down to the operation //need to propagate path level down to the operation
for (Parameter parameter : path.getParameters()) { if(path.getParameters() != null) {
//skip propagation if a parameter with the same name is already defined at the operation level for (Parameter parameter : path.getParameters()) {
if (!operationParameters.contains(generateParameterId(parameter))) { //skip propagation if a parameter with the same name is already defined at the operation level
operation.addParameter(parameter); if (!operationParameters.contains(generateParameterId(parameter))) {
operation.addParameter(parameter);
}
} }
} }