mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix bug
This commit is contained in:
@@ -250,7 +250,9 @@ public class ObjectMapper {
|
||||
*/
|
||||
private static void mapFromBean(final Object bean, final JSONObject jsonObject, final Filter<MutableEntry<String, Object>> filter) {
|
||||
final CopyOptions copyOptions = InternalJSONUtil.toCopyOptions(jsonObject.getConfig());
|
||||
copyOptions.setFieldEditor((entry -> filter.accept(entry) ? entry : null));
|
||||
if(null != filter){
|
||||
copyOptions.setFieldEditor((entry -> filter.accept(entry) ? entry : null));
|
||||
}
|
||||
BeanUtil.beanToMap(bean, jsonObject, copyOptions);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user