Skip to content

Commit a020798

Browse files
author
zhangrongfan
committed
Try to fix
1 parent 2a2ef67 commit a020798

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mybatis-boost-core/src/main/java/cn/mybatisboost/json/JsonResultSetsHandler.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ public Object intercept(Invocation invocation) throws Throwable {
3434

3535
for (Object object : proceed) {
3636
for (Field field : fields) {
37-
Object value = ((Property<?>) field.get(object)).orElse(null);
37+
Object value = field.get(object);
38+
if (value != null) {
39+
value = ((Property<?>) value).get();
40+
}
3841
if (value instanceof String) {
3942
field.set(object, Property.of(JsonTypeHandler.objectMapper.readValue((String) value,
4043
(Class<?>) ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0])));

0 commit comments

Comments
 (0)