-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
Alex Antonov opened SPR-6848 and commented
When trying to implement a HttpMessageConverter for Google Protocol Buffers I've run into a limitation by the write and read method signatures that require an exact type T.
With Protocol Buffers, as with many other types of marshaling systems, there is a base class, Message in this case, that all exact classes extend or implement.
canRead and canWrite methods do declare the relaxed and appropriate signature of <? extends T>, however in the read and write methods its being set to exactly T.
This prevents of calling the converter's write and read methods with passing an implementation of Message as an argument, since it does not conform to the generic restrictions set forth by the interfaces.
Affects: 3.0 GA
Issue Links:
- HttpMessageConverter should accept Class<? extends T> on can read [SPR-6771] #11437 HttpMessageConverter should accept Class<? extends T> on can read
Referenced from: commits 4ae1709