When I try your example Michael I see the error go away. However if you invert the null check the error appears. “user” can be null and what if you need to “doSomething()” if its null. Sonar says to change the condition so that is does not always evaluate to false.
The “first()” method is annotated with Nullable, what are we missing here?
squid:S2583
EDIT:
Looking over other posts it looks like mongodb Nullable isn’t in the list of: