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 1
1
/*
2
- * Copyright 2016-2017 the original author or authors.
2
+ * Copyright 2016-2018 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
35
35
import org .springframework .messaging .Message ;
36
36
import org .springframework .messaging .MessageHandlingException ;
37
37
import org .springframework .util .Assert ;
38
+ import org .springframework .util .ClassUtils ;
38
39
import org .springframework .util .ReflectionUtils ;
39
40
40
41
/**
@@ -114,7 +115,9 @@ else if (Map.class.isAssignableFrom(parameterType)) {
114
115
}
115
116
}
116
117
else {
117
- if (this .payloadType != null ) {
118
+ if (this .payloadType != null &&
119
+ !ClassUtils .isAssignable (this .payloadType .getType (), message .getPayload ().getClass ())) {
120
+
118
121
if (Message .class .isAssignableFrom (this .payloadType .getType ())) {
119
122
args [i ] = message ;
120
123
}
You can’t perform that action at this time.
0 commit comments