mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
fix: 判断 getter 方法不正确问题。
This commit is contained in:
parent
243705b54a
commit
4939013da6
@ -114,9 +114,9 @@ public class StrUtil {
|
||||
|
||||
public static boolean isGetterMethod(String methodName, String property) {
|
||||
if (methodName.startsWith("get") && methodName.length() > 3) {
|
||||
return firstCharToUpperCase(property).equals(methodName.substring(3));
|
||||
return firstCharToUpperCase(property).concat("()").equals(methodName.substring(3));
|
||||
} else if (methodName.startsWith("is") && methodName.length() > 2) {
|
||||
return firstCharToUpperCase(property).equals(methodName.substring(2));
|
||||
return firstCharToUpperCase(property).concat("()").equals(methodName.substring(2));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user