修复xml转json再转bean失败问题

This commit is contained in:
Looly
2023-06-14 13:33:33 +08:00
parent bd50e7f474
commit fbe0d5d3cd
18 changed files with 170 additions and 36 deletions

View File

@@ -211,7 +211,7 @@ public class JSONConverter implements Converter {
}
// 尝试转Bean
if (BeanUtil.isBean(rawType)) {
if (BeanUtil.isWritableBean(rawType)) {
// issue#I5WDP0 对于Kotlin对象由于参数可能非空限制导致无法创建一个默认的对象再赋值
if(KClassUtil.isKotlinClass(rawType) && json instanceof JSONGetter){
return KClassUtil.newInstance(rawType, new JSONGetterValueProvider<>((JSONGetter<String>)json));