【7.1.6】修复问题

pull/25/head
rays 2022-01-11 16:31:55 +08:00
parent 71de4c9ef2
commit 40d634556b
1 changed files with 5 additions and 3 deletions

View File

@ -303,12 +303,14 @@ public class ClassReflectUtil {
FieldMetadata fieldMetadata = genericFieldAndNameMap.get(fieldActualTypeArgument.getTypeName()); FieldMetadata fieldMetadata = genericFieldAndNameMap.get(fieldActualTypeArgument.getTypeName());
if (ObjectUtil.isNotEmpty(fieldMetadata)) { if (ObjectUtil.isNotEmpty(fieldMetadata)) {
FieldMetadata metadata = fieldAndNameMap.get(field.getName()); FieldMetadata metadata = fieldAndNameMap.get(field.getName());
if (ObjectUtil.isNotEmpty(metadata)) {
Set<FieldMetadata> metadataSet = new LinkedHashSet<>(); Set<FieldMetadata> metadataSet = new LinkedHashSet<>();
metadataSet.add(fieldMetadata); metadataSet.add(fieldMetadata);
metadata.setGenericFieldMetadata(metadataSet); metadata.setGenericFieldMetadata(metadataSet);
} }
} }
} }
}
// 字段本身就是泛型 // 字段本身就是泛型
else if (type instanceof TypeVariable) { else if (type instanceof TypeVariable) {