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
Missing null checks in AbstractMessageChannel.addInterceptor/setInterceptors #25088
Comments
Gary, are you asking for assertions there? Or do you expect it to ignore Generally speaking, we don't necessarily add assertions for non-null arguments at this point, relying on our nullability semantics instead. It doesn't hurt to assert for it nevertheless, in particular when adding elements to internal collections. |
Looking around, we tend to have assertions in individual registration methods a la |
Unfortunately, (Not a problem with Kotlin, of course). With collections (that can be nulled), we generally use |
Good point, for |
@jhoeller If you don't add null checks, there will be null exceptions. |
Causes downstream NPEs at runtime...
https://stackoverflow.com/questions/61828635/occassional-nullpointerexception-when-publishing-stomp-message-using-springframe/61828913#61828913
The text was updated successfully, but these errors were encountered: