mirror of
https://gitee.com/dromara/hutool.git
synced 2026-02-09 09:16:26 +08:00
增加Record支持(pr#4096@Github)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
// 跳过空对象
|
||||
|
||||
Reference in New Issue
Block a user