mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix(BeanUtil): 忽略大小写与忽略字段同时使用冲突
- https://gitee.com/dromara/hutool/issues/I80FP4 - 先以原始输入判断是否忽略,后进行忽略大小写的转换
This commit is contained in:
parent
4771078cf4
commit
0d4bb1beec
@ -11,6 +11,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* Bean属性拷贝到Bean中的拷贝器
|
* Bean属性拷贝到Bean中的拷贝器
|
||||||
*
|
*
|
||||||
|
* @author Admin
|
||||||
* @param <S> 源Bean类型
|
* @param <S> 源Bean类型
|
||||||
* @param <T> 目标Bean类型
|
* @param <T> 目标Bean类型
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
@ -53,14 +54,14 @@ public class BeanToBeanCopier<S, T> extends AbsCopier<S, T> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sFieldName = copyOptions.editFieldName(sFieldName);
|
// 忽略不需要拷贝的 key,
|
||||||
// 对key做转换,转换后为null的跳过
|
if (false == copyOptions.testKeyFilter(sFieldName)) {
|
||||||
if (null == sFieldName) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 忽略不需要拷贝的 key,
|
sFieldName = copyOptions.editFieldName(sFieldName);
|
||||||
if (false == copyOptions.testKeyFilter(sFieldName)) {
|
// 对key做转换,转换后为null的跳过
|
||||||
|
if (null == sFieldName) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user