fix MapToMap ignoreNullValue

This commit is contained in:
bwcx_jzy 2022-10-12 12:44:07 +08:00
parent c12102e89b
commit 1be615c822
No known key found for this signature in database
GPG Key ID: 5E48E9372088B9E5

View File

@ -48,6 +48,10 @@ public class MapToMapCopier extends AbsCopier<Map, Map> {
if (false == copyOptions.override && null != targetValue) { if (false == copyOptions.override && null != targetValue) {
return; return;
} }
// 忽略空值
if (false == copyOptions.ignoreNullValue && sValue == null) {
return;
}
// 获取目标值真实类型并转换源值 // 获取目标值真实类型并转换源值
final Type[] typeArguments = TypeUtil.getTypeArguments(this.targetType); final Type[] typeArguments = TypeUtil.getTypeArguments(this.targetType);