mirror of
https://github.com/yangzongzhuan/RuoYi.git
synced 2025-10-15 10:08:26 +00:00
获取属性的get方法空值验证
This commit is contained in:
@@ -891,7 +891,7 @@ public class ExcelUtil<T>
|
||||
*/
|
||||
private Object getValue(Object o, String name) throws Exception
|
||||
{
|
||||
if (StringUtils.isNotEmpty(name))
|
||||
if (StringUtils.isNotNull(o) && StringUtils.isNotEmpty(name))
|
||||
{
|
||||
Class<?> clazz = o.getClass();
|
||||
Field field = clazz.getDeclaredField(name);
|
||||
|
Reference in New Issue
Block a user