mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-12-06 17:18:54 +08:00
增加Record支持(pr#4096@Github)
This commit is contained in:
parent
a166a731db
commit
96a75cd2e4
@ -21,6 +21,7 @@
|
||||
* 【extra 】 `PinyinUtil`增加判空(pr#4081@Github)
|
||||
* 【core 】 `LocalDateTimeUtil.parseDate`注释修正(pr#4085@Github)
|
||||
* 【core 】 `StrUtil`增加null检查处理(pr#4086@Github)
|
||||
* 【json 】 增加Record支持(pr#4096@Github)
|
||||
|
||||
### 🐞Bug修复
|
||||
* 【core 】 修复`ReflectUtil`中因class和Method关联导致的缓存无法回收问题(issue#4039@Github)
|
||||
|
||||
@ -109,12 +109,12 @@ public class ObjectMapper {
|
||||
} else if (source instanceof ResourceBundle) {
|
||||
// JSONTokener
|
||||
mapFromResourceBundle((ResourceBundle) source, jsonObject, filter);
|
||||
} else if (RecordUtil.isRecord(source.getClass())) {
|
||||
mapFromBean(source, jsonObject);
|
||||
} else if (BeanUtil.isReadableBean(source.getClass())) {
|
||||
// 普通Bean
|
||||
// TODO 过滤器对Bean无效,需补充。
|
||||
mapFromBean(source, jsonObject);
|
||||
} else if (RecordUtil.isRecord(source.getClass())) {
|
||||
mapFromBean(source, jsonObject);
|
||||
}
|
||||
|
||||
// 跳过空对象
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user