Skip to content

Conversation

gtoison
Copy link
Contributor

@gtoison gtoison commented Jul 23, 2025

The CustomUserValue annotation disables the "iterative stack analysis" and this results in a false positive in the test case of this PR.
Apparently removing the annotation is compatible with still using "user values" on the stack items

This should fix #2258

orfl = orfl.next;
}

next = orfl;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without the change in that PR, the state of the stack here is the same as if the while loop above wasn't there.

@gtoison gtoison merged commit 1a91288 into spotbugs:master Jul 28, 2025
15 checks passed
@gtoison gtoison mentioned this pull request Jul 28, 2025
1 task
@hazendaz hazendaz added this to the Spotbugs 4.9.4 milestone Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[false-positive] SA_FIELD_SELF_ASSIGNMENT reported when value changed
3 participants