SimpleBrokerMessageHandler makes an assertion about the type of the MessageHeaderAccessor, but doesn't seem to care [SPR-14279] #18851
Labels
status: backported
An issue that has been backported to maintenance branches
type: enhancement
A general enhancement
Milestone
Uh oh!
There was an error while loading. Please reload this page.
Dave Syer opened SPR-14279 and commented
There's an assertion here: https://github.com/spring-projects/spring-framework/blob/master/spring-messaging/src/main/java/org/springframework/messaging/simp/broker/SimpleBrokerMessageHandler.java#L227. It says that the type of the accessor must be SimpMessageHeaderAccessor. But then the accessor is never actually used, so I'm wondering if the assertion is redundant.
It causes issues if anyone adds a ChannelInterceptor which manipulates headers, which seems like a perfectly valid thing to do, independent of whether you are a websocket client or not.
Affects: 4.2.6
Reference URL: spring-cloud/spring-cloud-sleuth#276
Issue Links:
Backported to: 4.2.7
The text was updated successfully, but these errors were encountered: