Skip to content

SimpleBrokerMessageHandler makes an assertion about the type of the MessageHeaderAccessor, but doesn't seem to care [SPR-14279] #18851

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue May 17, 2016 · 2 comments
Assignees
Labels
status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented May 17, 2016

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

@spring-projects-issues
Copy link
Collaborator Author

Rossen Stoyanchev commented

This is probably a left-over from before the static accessor methods were added to the MessageHeaderAccessor hierarchy that we can probably remove.

@spring-projects-issues
Copy link
Collaborator Author

Dave Syer commented

Could this be back ported to 4.2 please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants