Skip to content

Commit

Permalink
[6.2.0][dev] 修复 ObjectConverter 转换异常
Browse files Browse the repository at this point in the history
  • Loading branch information
Bkm016 committed Sep 28, 2024
1 parent 3fb2bbd commit 5ecfb51
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -531,15 +531,16 @@ private <T> T createInstance(Class<T> tClass) {
* 获取字段的转换器
*/
private Converter getConverter(Field field) {
// 优先获取 @Converter 注解
Converter converter = AnnotationUtils.getConverter(field);
if (converter != null) return converter;
// 已知的包装类型
if (field.getType() == UUID.class) {
return new UUIDConverter();
}
if (Map.class.isAssignableFrom(field.getType())) {
return new MapConverter();
}
Converter converter = AnnotationUtils.getConverter(field);
if (converter != null) return converter;
return null;
}

Expand Down

0 comments on commit 5ecfb51

Please sign in to comment.