Repository navigation
fix(caching): mark MultiCacheStatistics' counter warning as a false positive - #1573
Merged
Merged
Conversation
joaodinissf
marked this pull request as ready for review
October 16, 2026 14:28
joaodinissf
enabled auto-merge
October 16, 2026 14:28
andrewL-avlq
previously approved these changes
Oct 16, 2026
…ositive SpotBugs 4.10.5 reports AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE for counter++ in CacheManager.MultiCacheStatistics.aggregate. Every instance is created locally, filled while holding the caches' lock and read by the same thread afterwards, so no other thread sees it. Suppress the warning the same way as in ParallelResourceLoader, so that the SpotBugs bump (#1572) builds. Bump the bundle to 17.3.2 and both features to 19.3.1, since 17.3.1 and 19.3.0 were released. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
joaodinissf
force-pushed
the
fix/spotbugs-cachemanager-statistics
branch
from
October 16, 2026 15:46
7e6a7b4 to
7a74446
Compare
andrewL-avlq
approved these changes
Oct 16, 2026
This was referenced Oct 17, 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) fails on one new finding:
AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLEforcounter++inCacheManager.MultiCacheStatistics.aggregate. It is a false positive: everyMultiCacheStatisticsis created locally (getStatistics()and each report run), filled while holding the caches' lock and read afterwards by the same thread.Special things to note
@SuppressFBWarnings, as already done for the same pattern inParallelResourceLoader; no behaviour change.com.avaloq.tools.ddkgoes to 17.3.2 and both features to 19.3.1 (feature.xml, poms,category.xml), since 17.3.1 and 19.3.0 were released.-Dspotbugs.version=4.10.5 -Dspotbugs.plugin.version=4.10.5.0): no bugs, and the release version check passes. This PR's own CI still runs SpotBugs 4.10.4, which doesn't report it.🤖 Generated with Claude Code