vojtechhabarta/typescript-generator

NullPointerException in ModelCompiler related to generics

artemana opened this issue · 0 comments

The GenericsResolver.mapGenericVariablesToBase() may return null, but that code below does not handle it.

for (BeanModel descendant : descendants) {
// do not handle bean as tagged union if any descendant has "non-related" generic parameter
final List mappedGenericVariables = GenericsResolver.mapGenericVariablesToBase(descendant.getOrigin(), bean.getOrigin());
if (mappedGenericVariables.contains(null)) {
isTaggedUnion = false;
}
}