mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
optimize FieldWrapper.java
This commit is contained in:
parent
e12d92f17c
commit
a873bbcaac
@ -15,8 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
package com.mybatisflex.core.util;
|
package com.mybatisflex.core.util;
|
||||||
|
|
||||||
import com.mybatisflex.core.exception.FlexExceptions;
|
|
||||||
|
|
||||||
import java.lang.reflect.*;
|
import java.lang.reflect.*;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -57,7 +55,7 @@ public class FieldWrapper {
|
|||||||
&& method.getName().equals("set" + StringUtil.firstCharToUpperCase(fieldName)));
|
&& method.getName().equals("set" + StringUtil.firstCharToUpperCase(fieldName)));
|
||||||
|
|
||||||
if (setter == null) {
|
if (setter == null) {
|
||||||
throw FlexExceptions.wrap("Can not find method \"set" + StringUtil.firstCharToUpperCase(fieldName) + "\" in class: " + clazz);
|
throw new IllegalStateException("Can not find method \"set" + StringUtil.firstCharToUpperCase(fieldName) + "\" in class: " + clazz);
|
||||||
}
|
}
|
||||||
|
|
||||||
fieldWrapper = new FieldWrapper();
|
fieldWrapper = new FieldWrapper();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user