enhance pull #152 .
This commit is contained in:
parent
2eedb8fa4b
commit
e64cfdcbda
|
@ -152,7 +152,13 @@ public class JsonBuildHelper {
|
|||
|
||||
data0.append("{");
|
||||
String[] globGicName = DocClassUtil.getSimpleGicName(genericCanonicalName);
|
||||
|
||||
if (Objects.isNull(globGicName) || globGicName.length < 1) {
|
||||
// obtain generics from parent class
|
||||
JavaClass superJavaClass = cls != null ? cls.getSuperJavaClass() : null;
|
||||
if (Objects.nonNull(superJavaClass) && !"Object".equals(superJavaClass.getSimpleName())) {
|
||||
globGicName = DocClassUtil.getSimpleGicName(superJavaClass.getGenericFullyQualifiedName());
|
||||
}
|
||||
}
|
||||
JavaClassUtil.genericParamMap(genericMap, cls, globGicName);
|
||||
StringBuilder data = new StringBuilder();
|
||||
if (JavaClassValidateUtil.isCollection(typeName) || JavaClassValidateUtil.isArray(typeName)) {
|
||||
|
|
|
@ -82,8 +82,8 @@ public class ParamsBuildHelper {
|
|||
String simpleName = DocClassUtil.getSimpleName(className);
|
||||
String[] globGicName = DocClassUtil.getSimpleGicName(className);
|
||||
JavaClass cls = projectBuilder.getClassByName(simpleName);
|
||||
if (globGicName == null || globGicName.length <= 0) {
|
||||
//获取父类的泛型
|
||||
if (Objects.isNull(globGicName) || globGicName.length < 1) {
|
||||
// obtain generics from parent class
|
||||
JavaClass superJavaClass = cls != null ? cls.getSuperJavaClass() : null;
|
||||
if (superJavaClass != null && !"Object".equals(superJavaClass.getSimpleName())) {
|
||||
globGicName = DocClassUtil.getSimpleGicName(superJavaClass.getGenericFullyQualifiedName());
|
||||
|
|
Loading…
Reference in New Issue