Skip to content

Commit

Permalink
better null check to surpress sonarcloud warning (#9888)
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 authored Jul 4, 2021
1 parent d2e79be commit a5c98dd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2834,7 +2834,7 @@ private CodegenProperty discriminatorFound(String composedSchemaName, Schema sc,
"'{}' defines discriminator '{}', but the referenced AnyOf schema '{}' is missing {}",
composedSchemaName, discPropName, modelName, discPropName);
}
if (cp.dataType == null) {
if (cp != null && cp.dataType == null) {
cp = thisCp;
continue;
}
Expand Down

0 comments on commit a5c98dd

Please sign in to comment.