mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-08 01:28:24 +08:00
fix: fix and close #I9V10O
This commit is contained in:
parent
d111744080
commit
6c1764f1e6
@ -285,23 +285,11 @@ public class ClassUtil {
|
||||
}
|
||||
|
||||
Method[] declaredMethods = clazz.getDeclaredMethods();
|
||||
if (clazz.isInterface()) {
|
||||
for (Method method : declaredMethods) {
|
||||
// 接口类只需要获取 default 方法
|
||||
if (method.isDefault() && (predicate == null || predicate.test(method))) {
|
||||
methods.add(method);
|
||||
if (firstOnly) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (Method method : declaredMethods) {
|
||||
if (predicate == null || predicate.test(method)) {
|
||||
methods.add(method);
|
||||
if (firstOnly) {
|
||||
break;
|
||||
}
|
||||
for (Method method : declaredMethods) {
|
||||
if (predicate == null || predicate.test(method)) {
|
||||
methods.add(method);
|
||||
if (firstOnly) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user