mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
Converter转换规则变更,空对象、空值转为Bean时,创建默认对象,而非nul
This commit is contained in:
parent
b2510cf661
commit
c7019cd851
@ -344,7 +344,7 @@ public class ConverterRegistry implements Serializable {
|
|||||||
// 空值转空Bean
|
// 空值转空Bean
|
||||||
if(ObjectUtil.isEmpty(value)){
|
if(ObjectUtil.isEmpty(value)){
|
||||||
// issue#3649 空值转空对象,则直接实例化
|
// issue#3649 空值转空对象,则直接实例化
|
||||||
return (T) ReflectUtil.newInstanceIfPossible(rowType);
|
return ReflectUtil.newInstanceIfPossible(rowType);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表示非需要特殊转换的对象
|
// 表示非需要特殊转换的对象
|
||||||
|
Loading…
x
Reference in New Issue
Block a user