mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复BeanUtil.copyProperties中mapToMap时key被转为String问题
This commit is contained in:
@@ -208,7 +208,9 @@ public class JSONObjectMapper {
|
||||
private void mapFromBean(final Object bean, final JSONObject jsonObject) {
|
||||
final CopyOptions copyOptions = InternalJSONUtil.toCopyOptions(jsonObject.config());
|
||||
if (null != this.predicate) {
|
||||
copyOptions.setFieldEditor((entry -> this.predicate.test(entry) ? entry : null));
|
||||
copyOptions.setFieldEditor((entry -> this.predicate.test(
|
||||
MutableEntry.of(StrUtil.toStringOrNull(entry.getKey()), entry.getValue())) ?
|
||||
entry : null));
|
||||
}
|
||||
BeanUtil.beanToMap(bean, jsonObject, copyOptions);
|
||||
}
|
||||
|
Reference in New Issue
Block a user