[java] NullAssignment false positive#1033
Conversation
There was a problem hiding this comment.
I'm not sure this is actually right... the lambda is a find boundary. From its point of view, it's a return test ? truthy : null which would be ok (it's not an assignment). For the assignmet you would have to understand the semantics of computeIfAbsent
There was a problem hiding this comment.
You're right - in this specific example (for computeIfAbsent) the result is a null assignment. But it won't be always the "computeIfAbsent" usage case....
I'll change the test to not expect a violation here, otherwise we'll probably get many false positives.
There was a problem hiding this comment.
@jsotuyod I've adjusted the test+implementation to ignore lambdas.
I've also rebase this PR against master, it should be ready now.
jsotuyod
left a comment
There was a problem hiding this comment.
awesome! I'll merge it soon. Shall we open a new issue to track the one scenario we are still not handling?
|
I've created a new issue: #1050 |
Fixes #629
Note: This is a partial fix only.
This FP is not detected: