Fixing INT-229: Primitive array payloads should be passed directly to the method and not cast down to Object[]

This commit is contained in:
Marius Bogoevici
2008-05-22 21:08:10 +00:00
parent a1d1caa1eb
commit 8bc5e669a7

View File

@@ -150,7 +150,8 @@ public abstract class AbstractMessageHandlerAdapter implements MessageHandler, I
}
Object args[] = null;
Object mappingResult = (this.methodExpectsMessage) ? message : this.messageMapper.mapMessage(message);
if (mappingResult != null && mappingResult.getClass().isArray()) {
if (mappingResult != null && mappingResult.getClass().isArray()
&& (Object.class.isAssignableFrom(mappingResult.getClass().getComponentType()))) {
args = (Object[]) mappingResult;
}
else {