Skip to content

fix(caching): mark MultiCacheStatistics' counter warning as a false positive - #1573

Merged
joaodinissf merged 1 commit into
masterfrom
fix/spotbugs-cachemanager-statistics
Oct 16, 2026
Merged

joaodinissf merged 1 commit into
masterfrom
fix/spotbugs-cachemanager-statistics

Conversation

@joaodinissf

@joaodinissf joaodinissf commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Why the change

The SpotBugs 4.10.5 bump (#1572) fails on one new finding: AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE for counter++ in CacheManager.MultiCacheStatistics.aggregate. It is a false positive: every MultiCacheStatistics is created locally (getStatistics() and each report run), filled while holding the caches' lock and read afterwards by the same thread.

Special things to note

  • Suppressed with DDK's own @SuppressFBWarnings, as already done for the same pattern in ParallelResourceLoader; no behaviour change.
  • com.avaloq.tools.ddk goes 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.
  • Verified locally with SpotBugs 4.10.5 and spotbugs-maven-plugin 4.10.5.0 (-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.
  • Once merged, chore(deps): bump com.github.spotbugs:spotbugs from 4.10.4 to 4.10.5 in /ddk-parent #1572 needs a rebase to pick it up.

🤖 Generated with Claude Code

@joaodinissf
joaodinissf marked this pull request as ready for review October 16, 2026 14:28
@joaodinissf
joaodinissf enabled auto-merge October 16, 2026 14:28
andrewL-avlq
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
joaodinissf added this pull request to the merge queue Oct 16, 2026
Merged via the queue into master with commit 5bed5bb Oct 16, 2026
4 checks passed
@joaodinissf
joaodinissf deleted the fix/spotbugs-cachemanager-statistics branch October 16, 2026 16:42
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

Successfully merging this pull request may close these issues.

2 participants