Merge branch '6.2.x'

This commit is contained in:
Sam Brannen 2025-10-02 11:45:43 +02:00
commit 1e83de072c
1 changed files with 2 additions and 3 deletions

View File

@ -1518,7 +1518,6 @@ public abstract class ClassUtils {
private static @Nullable Method findPubliclyAccessibleMethodIfPossible(
String methodName, Class<?>[] parameterTypes, Class<?> declaringClass) {
Method result = null;
Class<?> current = declaringClass.getSuperclass();
while (current != null) {
Method method = getMethodOrNull(current, methodName, parameterTypes);
@ -1528,11 +1527,11 @@ public abstract class ClassUtils {
if (Modifier.isPublic(method.getDeclaringClass().getModifiers()) &&
method.getDeclaringClass().getModule().isExported(
method.getDeclaringClass().getPackageName(), ClassUtils.class.getModule())) {
result = method;
return method;
}
current = method.getDeclaringClass().getSuperclass();
}
return result;
return null;
}
/**