Use Method#isDefault to find default methods in interfaces
Closes gh-31197
This commit is contained in:
@@ -491,7 +491,7 @@ public abstract class ReflectionUtils {
|
||||
List<Method> result = null;
|
||||
for (Class<?> ifc : clazz.getInterfaces()) {
|
||||
for (Method ifcMethod : ifc.getMethods()) {
|
||||
if (!Modifier.isAbstract(ifcMethod.getModifiers())) {
|
||||
if (ifcMethod.isDefault()) {
|
||||
if (result == null) {
|
||||
result = new ArrayList<>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user