spotbugs / spotbugs

SpotBugs is FindBugs' successor. A tool for static analysis to look for bugs in Java code.

Home Page:https://spotbugs.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[false-positive] SA_FIELD_SELF_ASSIGNMENT reported when value changed

zbynek opened this issue · comments

In the minimal testcase
the assignment to next is reported as self-assignment, though it's not the case (orfl changed since last assignment).

The test code is a simplified version of the original class that triggered this report.

@KengoTODA @baloghadamsoftware this comes from #2161

Thanks for opening your first issue here! 😃
Please check our contributing guideline. Especially when you report a problem, make sure you share a Minimal, Complete, and Verifiable example to reproduce it in this issue.

Seems that removing @CustomUserValue fixes the issue and adding @CustomUserValue to the old version of code (before #2161) is enough to reproduce it.