mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-08 09:38:26 +08:00
fix: fix and close #I9V10O
This commit is contained in:
parent
d111744080
commit
6c1764f1e6
@ -285,17 +285,6 @@ public class ClassUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Method[] declaredMethods = clazz.getDeclaredMethods();
|
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) {
|
for (Method method : declaredMethods) {
|
||||||
if (predicate == null || predicate.test(method)) {
|
if (predicate == null || predicate.test(method)) {
|
||||||
methods.add(method);
|
methods.add(method);
|
||||||
@ -304,7 +293,6 @@ public class ClassUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (firstOnly && !methods.isEmpty()) {
|
if (firstOnly && !methods.isEmpty()) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user