Skip to content
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

[false-positive] SA_FIELD_SELF_ASSIGNMENT reported when value changed #2258

Open
zbynek opened this issue Nov 15, 2022 · 3 comments
Open

[false-positive] SA_FIELD_SELF_ASSIGNMENT reported when value changed #2258

zbynek opened this issue Nov 15, 2022 · 3 comments

Comments

@zbynek
Copy link

zbynek commented Nov 15, 2022

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

@welcome
Copy link

welcome bot commented Nov 15, 2022

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.

zbynek pushed a commit to zbynek/spotbugs that referenced this issue Nov 15, 2022
@zbynek
Copy link
Author

zbynek commented Nov 16, 2022

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

@zbynek
Copy link
Author

zbynek commented Nov 29, 2022

@KengoTODA any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant