修复BeanToMapCopier获取类型数组越界问题

This commit is contained in:
Looly
2024-01-22 09:20:14 +08:00
parent 97577d7dd2
commit cb093e067d
2 changed files with 3 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ public class BeanToMapCopier extends AbsCopier<Object, Map> {
// 获取目标值真实类型并转换源值
final Type[] typeArguments = TypeUtil.getTypeArguments(this.targetType);
if(null != typeArguments){
if(null != typeArguments && typeArguments.length > 1){
//sValue = Convert.convertWithCheck(typeArguments[1], sValue, null, this.copyOptions.ignoreError);
sValue = this.copyOptions.convertField(typeArguments[1], sValue);
sValue = copyOptions.editFieldValue(sFieldName, sValue);