Avoid synthesizable annotation creation for @Bean/@Scope processing
Includes consistent (non-)use of AnnotationUtils/AnnotatedElementUtils. Issue: SPR-16933
This commit is contained in:
@@ -192,7 +192,6 @@ public class SendToMethodReturnValueHandler implements HandlerMethodReturnValueH
|
||||
}
|
||||
|
||||
private DestinationHelper getDestinationHelper(MessageHeaders headers, MethodParameter returnType) {
|
||||
|
||||
SendToUser m1 = AnnotatedElementUtils.findMergedAnnotation(returnType.getExecutable(), SendToUser.class);
|
||||
SendTo m2 = AnnotatedElementUtils.findMergedAnnotation(returnType.getExecutable(), SendTo.class);
|
||||
if ((m1 != null && !ObjectUtils.isEmpty(m1.value())) || (m2 != null && !ObjectUtils.isEmpty(m2.value()))) {
|
||||
@@ -205,8 +204,8 @@ public class SendToMethodReturnValueHandler implements HandlerMethodReturnValueH
|
||||
return new DestinationHelper(headers, c1, c2);
|
||||
}
|
||||
|
||||
return m1 != null || m2 != null ?
|
||||
new DestinationHelper(headers, m1, m2) : new DestinationHelper(headers, c1, c2);
|
||||
return (m1 != null || m2 != null ?
|
||||
new DestinationHelper(headers, m1, m2) : new DestinationHelper(headers, c1, c2));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -291,9 +290,9 @@ public class SendToMethodReturnValueHandler implements HandlerMethodReturnValueH
|
||||
return this.sendToUser;
|
||||
}
|
||||
|
||||
|
||||
public String expandTemplateVars(String destination) {
|
||||
return placeholderHelper.replacePlaceholders(destination, this.placeholderResolver);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user