optimize FieldWrapper.java

This commit is contained in:
开源海哥 2023-05-28 09:28:22 +08:00
parent e12d92f17c
commit a873bbcaac

View File

@ -15,8 +15,6 @@
*/
package com.mybatisflex.core.util;
import com.mybatisflex.core.exception.FlexExceptions;
import java.lang.reflect.*;
import java.util.Collection;
import java.util.Map;
@ -57,7 +55,7 @@ public class FieldWrapper {
&& method.getName().equals("set" + StringUtil.firstCharToUpperCase(fieldName)));
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();