This commit is contained in:
Looly 2025-02-17 13:13:35 +08:00
parent 138b3c5040
commit 3ad59af2bc
3 changed files with 3 additions and 3 deletions

View File

@ -65,7 +65,7 @@ public class PropDesc {
*/
public PropDesc(final Field field, final Method getter, final Method setter) {
this(FieldUtil.getFieldName(field), getter, setter);
this.fieldInvoker = null == field ? null : FieldInvoker.of(field);
this.fieldInvoker = FieldInvoker.of(field);
}
/**

View File

@ -49,7 +49,7 @@ public class FieldInvoker implements Invoker {
* @return {@code FieldInvoker}
*/
public static FieldInvoker of(final Field field) {
return new FieldInvoker(field);
return null == field ? null : new FieldInvoker(field);
}
private final Field field;

View File

@ -38,7 +38,7 @@ public class MethodInvoker implements Invoker {
* @return 方法调用器
*/
public static MethodInvoker of(final Method method) {
return new MethodInvoker(method);
return null == method ? null : new MethodInvoker(method);
}
private final Method method;