You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I couldn't find a better place to open this... Please redirect me if there is.
spring-messaging, since v5.0.0, has marked method SimpMessageHeaderAccessor#getUser as @Nullable.
Which actually causes Findbugs to fail with code similar to your example, and rightfully so.
My question is how is this supposed to be handled properly? (i.e. when #getUser returns null)
Should the code throw an exception? do nothing?
And what does it actually mean that the user is null in this context?
Principal principal = headers.getUser();
if (principal == null) {
// what should happen here ?
}
Thanks !
The text was updated successfully, but these errors were encountered:
I couldn't find a better place to open this... Please redirect me if there is.
spring-messaging, since v5.0.0, has marked method SimpMessageHeaderAccessor#getUser as
@Nullable
.Which actually causes Findbugs to fail with code similar to your example, and rightfully so.
Specifically here: PresenceEventListener#handleSessionConnected
My question is how is this supposed to be handled properly? (i.e. when
#getUser
returnsnull
)Should the code throw an exception? do nothing?
And what does it actually mean that the user is
null
in this context?Thanks !
The text was updated successfully, but these errors were encountered: