File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
spring-integration-core/src/main/java/org/springframework/integration/handler Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright 2016-2017 the original author or authors.
2+ * Copyright 2016-2018 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
3535import org .springframework .messaging .Message ;
3636import org .springframework .messaging .MessageHandlingException ;
3737import org .springframework .util .Assert ;
38+ import org .springframework .util .ClassUtils ;
3839import org .springframework .util .ReflectionUtils ;
3940
4041/**
@@ -114,7 +115,9 @@ else if (Map.class.isAssignableFrom(parameterType)) {
114115 }
115116 }
116117 else {
117- if (this .payloadType != null ) {
118+ if (this .payloadType != null &&
119+ !ClassUtils .isAssignable (this .payloadType .getType (), message .getPayload ().getClass ())) {
120+
118121 if (Message .class .isAssignableFrom (this .payloadType .getType ())) {
119122 args [i ] = message ;
120123 }
You can’t perform that action at this time.
0 commit comments