modify: 优化对象转化,异常后返回空集合

This commit is contained in:
wuy 2020-07-14 16:20:44 +08:00
parent 2179e5b161
commit 932a81d7bf
1 changed files with 2 additions and 1 deletions

View File

@ -124,7 +124,8 @@ public class BeanUtils {
} }
} }
catch (Exception e){ catch (Exception e){
log.warn("对象转换异常, class: {}, error: {}", clazz.getName(), e.getMessage()); log.error("对象转换异常, class: {}, error: {}", clazz.getName(), e);
return Collections.emptyList();
} }
return resultList; return resultList;
} }