Skip to content

Commit

Permalink
fixed NPE on spring generator when using discriminator mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoMario committed Jun 29, 2021
1 parent 6c433e8 commit a029479
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,11 @@ protected List<Map<String, Object>> modelInheritanceSupport(List<?> allModels) {
Map<String, Object> parent = new HashMap<>();
parent.put("classname", parentModel.classname);
List<CodegenModel> childrenModels = byParent.get(parentModel);

if (childrenModels == null || childrenModels.isEmpty()) {
continue;
}

for (CodegenModel model : childrenModels) {
Map<String, Object> child = new HashMap<>();
child.put("name", model.name);
Expand Down

0 comments on commit a029479

Please sign in to comment.