Skip to content

Commit

Permalink
GH-2456: (Re) Support Spring Framework 5.2 (#2530)
Browse files Browse the repository at this point in the history
The framework is intended for use with Spring Framework 5.3.

However, this change was the only thing preventing it being used
with 5.2.
  • Loading branch information
garyrussell authored Sep 25, 2023
1 parent 429823b commit dcc49ba
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ private TypeMetadata buildMetadata(Class<?> targetClass) {
final List<ListenerMethod> methods = new ArrayList<>();
final List<Method> multiMethods = new ArrayList<>();
ReflectionUtils.doWithMethods(targetClass, method -> {
if (method.getDeclaringClass().getName().contains("$MockitoMock$")) {
return;
}
List<RabbitListener> listenerAnnotations = findListenerAnnotations(method);
if (listenerAnnotations.size() > 0) {
methods.add(new ListenerMethod(method,
Expand All @@ -331,8 +334,7 @@ private TypeMetadata buildMetadata(Class<?> targetClass) {
multiMethods.add(method);
}
}
}, ReflectionUtils.USER_DECLARED_METHODS
.and(meth -> !meth.getDeclaringClass().getName().contains("$MockitoMock$")));
}, ReflectionUtils.USER_DECLARED_METHODS);
if (methods.isEmpty() && multiMethods.isEmpty()) {
return TypeMetadata.EMPTY;
}
Expand Down

0 comments on commit dcc49ba

Please sign in to comment.