Closed
Description
Hi,
SchemaParserBuilder throws IllegalStateException "Unable to find generic type of class ..." when it is trying to load an interface method from parent. I guess the function relativeToPotentialParent should be revised to handle the case for interface:
fun relativeToPotentialParent(declaringType: JavaType): RelativeTo {
if(declaringType !is Class<*> || declaringType.isInterface) {
return relativeToType(declaringType)
}
val type = getGenericSuperType(mostSpecificType, declaringType)
if(type == null) {
error("Unable to find generic type of class ${TypeUtils.toString(declaringType)} relative to ${TypeUtils.toString(mostSpecificType)}")
} else {
return relativeToType(type)
}
}
Regards,
Alex