Repository navigation
fix(xtext): extend the counter warning suppression to removeMappings' visitor - #1574
Merged
Merged
Conversation
… visitor SpotBugs 4.10.5 reports AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE for size-- in QualifiedNameSegmentTreeLookup.removeMappings. removeMappings already suppresses it, as get() does for hits and misses, because the lookup accepts approximate counters; 4.10.5 attributes the decrement to the anonymous Visitor's visit(), which the outer annotation doesn't cover. Annotate visit() the same way. A full-reactor run of SpotBugs 4.10.5 reports no other finding, so this unblocks the SpotBugs bump (#1572). Bump the bundle to 17.4.3, since 17.4.2 was released in 19.3.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
joaodinissf
marked this pull request as ready for review
October 17, 2026 08:55
joaodinissf
enabled auto-merge
October 17, 2026 09:01
rubenporras
approved these changes
Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why the change
The SpotBugs 4.10.5 bump (#1572) still fails, on the second and last new finding:
AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLEforsize--inQualifiedNameSegmentTreeLookup.removeMappings. It is the same accepted pattern #1573 handled:removeMappingsalready suppresses this warning, asget()does forhitsandmisses, because the lookup tolerates approximate counters. SpotBugs 4.10.5 attributes the decrement to the anonymousVisitor'svisit(), which the outer annotation doesn't cover.Special things to note
visit()gets the same@SuppressFBWarningsasremoveMappings; no behaviour change.com.avaloq.tools.ddk.xtextgoes to 17.4.3, since 17.4.2 was released in 19.3.0. The features are already at 19.3.1 on master.spotbugs:spotbugsin all 56 analysed modules, so no module is skipped after an earlier failure) reported only this one. With this change, a full local build with SpotBugs 4.10.5 andspotbugs:check, checkstyle, PMD/CPD and the release version check passes.🤖 Generated with Claude Code