增加Record支持(pr#4096@Github)

This commit is contained in:
Looly 2025-10-10 22:12:49 +08:00
parent a166a731db
commit 96a75cd2e4
2 changed files with 3 additions and 2 deletions

View File

@ -21,6 +21,7 @@
* 【extra 】 `PinyinUtil`增加判空pr#4081@Github * 【extra 】 `PinyinUtil`增加判空pr#4081@Github
* 【core 】 `LocalDateTimeUtil.parseDate`注释修正pr#4085@Github * 【core 】 `LocalDateTimeUtil.parseDate`注释修正pr#4085@Github
* 【core 】 `StrUtil`增加null检查处理pr#4086@Github * 【core 】 `StrUtil`增加null检查处理pr#4086@Github
* 【json 】 增加Record支持pr#4096@Github
### 🐞Bug修复 ### 🐞Bug修复
* 【core 】 修复`ReflectUtil`中因class和Method关联导致的缓存无法回收问题issue#4039@Github * 【core 】 修复`ReflectUtil`中因class和Method关联导致的缓存无法回收问题issue#4039@Github

View File

@ -109,12 +109,12 @@ public class ObjectMapper {
} else if (source instanceof ResourceBundle) { } else if (source instanceof ResourceBundle) {
// JSONTokener // JSONTokener
mapFromResourceBundle((ResourceBundle) source, jsonObject, filter); mapFromResourceBundle((ResourceBundle) source, jsonObject, filter);
} else if (RecordUtil.isRecord(source.getClass())) {
mapFromBean(source, jsonObject);
} else if (BeanUtil.isReadableBean(source.getClass())) { } else if (BeanUtil.isReadableBean(source.getClass())) {
// 普通Bean // 普通Bean
// TODO 过滤器对Bean无效需补充 // TODO 过滤器对Bean无效需补充
mapFromBean(source, jsonObject); mapFromBean(source, jsonObject);
} else if (RecordUtil.isRecord(source.getClass())) {
mapFromBean(source, jsonObject);
} }
// 跳过空对象 // 跳过空对象