Skip to content

Commit

Permalink
WIP [spring-projects#1145] Single parameter or @Payload-annotated par…
Browse files Browse the repository at this point in the history
…ameter type inference
  • Loading branch information
stapel committed Nov 18, 2020
1 parent e7f60d6 commit 0a4f105
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,11 @@ private Type determineInferredType() {
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.
* We're looking for a single parameter, or one annotated with @Payload.
* We ignore parameters with type Message because they are not involved with conversion.
*/
if (isEligibleParameter(methodParameter)
&& (methodParameter.getParameterAnnotations().length == 0
&& (this.method.getParameterCount() == 1
|| methodParameter.hasParameterAnnotation(Payload.class))) {
if (genericParameterType == null) {
genericParameterType = extractGenericParameterTypFromMethodParameter(methodParameter);
Expand Down

0 comments on commit 0a4f105

Please sign in to comment.