MessageMethodArgumentResolver does not check the effective payload type. So if a method declares Method<Foo> and the current message is Message<Bar> it will be injected with a nasty ClassCastException at runtime.
Besides the resolver is strict, it cannot handle the declaration of a sub-type of Message.
Stéphane Nicoll opened SPR-11584 and commented
MessageMethodArgumentResolver
does not check the effective payload type. So if a method declaresMethod<Foo>
and the current message isMessage<Bar>
it will be injected with a nastyClassCastException
at runtime.Besides the resolver is strict, it cannot handle the declaration of a sub-type of
Message
.Referenced from: commits 2aee0d8, 2c1d5ef
The text was updated successfully, but these errors were encountered: