!1073 fix(BeanUtil),同时设置忽略大小写和忽略字段冲突问题

Merge pull request !1073 from 小怪兽说疼疼哒/fix-BeanUtil
This commit is contained in:
Looly 2023-09-12 10:00:26 +00:00 committed by Gitee
commit 683a7b74bd
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -11,6 +11,7 @@ import java.util.Map;
/**
* Bean属性拷贝到Bean中的拷贝器
*
* @author Admin
* @param <S> 源Bean类型
* @param <T> 目标Bean类型
* @since 5.8.0
@ -53,14 +54,14 @@ public class BeanToBeanCopier<S, T> extends AbsCopier<S, T> {
return;
}
sFieldName = copyOptions.editFieldName(sFieldName);
// 对key做转换转换后为null的跳过
if (null == sFieldName) {
// 忽略不需要拷贝的 key,
if (false == copyOptions.testKeyFilter(sFieldName)) {
return;
}
// 忽略不需要拷贝的 key,
if (false == copyOptions.testKeyFilter(sFieldName)) {
sFieldName = copyOptions.editFieldName(sFieldName);
// 对key做转换转换后为null的跳过
if (null == sFieldName) {
return;
}