AMQP-680: Avoid allocations from Method.getParameterTypes() in MessagingMessageListenerAdapter

This commit is contained in:
dreis2211
2016-12-01 21:32:15 +01:00
committed by Artem Bilan
parent 778ac0a1c9
commit e656c1250a

View File

@@ -256,7 +256,7 @@ public class MessagingMessageListenerAdapter extends AbstractAdaptableMessageLis
Type genericParameterType = null;
for (int i = 0; i < this.method.getParameterTypes().length; i++) {
for (int i = 0; i < this.method.getParameterCount(); i++) {
MethodParameter methodParameter = new MethodParameter(this.method, i);
/*
* We're looking for a single non-annotated parameter, or one annotated with @Payload.