Skip to content

Commit

Permalink
Use Method#isDefault to find default methods in interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
refeccd authored and sbrannen committed Sep 10, 2023
1 parent 6ca01e1 commit 9728b8c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ private static List<Method> findConcreteMethodsOnInterfaces(Class<?> clazz) {
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<>();
}
Expand Down

0 comments on commit 9728b8c

Please sign in to comment.