From 2cbc082c7b1d0bf3a0a55f79ee55692ef37245a3 Mon Sep 17 00:00:00 2001 From: "wei.peng" <123456> Date: Wed, 3 Jul 2019 18:43:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=AF=B9=E8=B1=A1=20?= =?UTF-8?q?=E7=A9=BA=E6=95=B0=E6=8D=AE=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/estsh/i3plus/pojo/base/dynamic/DynamicEntity.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/dynamic/DynamicEntity.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/dynamic/DynamicEntity.java index 15c744f..91b8cd0 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/dynamic/DynamicEntity.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/dynamic/DynamicEntity.java @@ -112,8 +112,12 @@ public class DynamicEntity extends BaseBean implements Serializable { try { val = getValue(propName,val); // LOGGER.error("设置动态对象属性值 attr name:{} -> value:{} ",setMethodName,val); - Method setMethod = this.getClass().getDeclaredMethod(setMethodName, new Class[]{val.getClass()}); - setMethod.invoke(this, val); + if(val != null){ + Method setMethod = this.getClass().getDeclaredMethod(setMethodName, new Class[]{val.getClass()}); + setMethod.invoke(this, val); + }else{ + LOGGER.error("设置动态对象属性值 attr name:{} -> value:{} ",setMethodName,val); + } } catch (NoSuchMethodException e) { // LOGGER.error("没有方法:{}",setMethodName,e); LOGGER.error("没有方法:{}",setMethodName);