Skip to content

build(deps): Upgrade to latest SpotBugs#19576

Open
amaechler wants to merge 3 commits into
apache:masterfrom
amaechler:spotbugs-upgrade
Open

build(deps): Upgrade to latest SpotBugs#19576
amaechler wants to merge 3 commits into
apache:masterfrom
amaechler:spotbugs-upgrade

Conversation

@amaechler

@amaechler amaechler commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Fixes #18373.

I came across @kgyrtkirk's issue above (#18373) which was auto-closed. Addressing the few spotbug warnings was straight-forward, especially with Claude doing all the work. This PR removes the pin so the plugin's matching default, 4.9.3, is used. I updated this PR now to jump to the latest Spotbugs version right away.

SpotBugs 4.9 ships some new "detectors". Running mvn spotbugs:check over all modules produced 17 new findings, handled as follows:

  • Excluded the new AT_* atomicity patterns in spotbugs-exclude.xml, alongside the already-excluded AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION. The flagged sites rely on external synchronization.
  • Excluded HSM_HIDING_METHOD. InvalidSqlInput hides the static InvalidInput.exception() factory methods by design.
  • Removed two @SuppressFBWarnings annotations that the new UselessSuppressionDetector reports as unnecessary.

This PR has:

  • been self-reviewed.

@amaechler amaechler changed the title Upgrade SpotBugs to 4.9.3 build(deps): Upgrade SpotBugs to 4.9.3 Jun 11, 2026

@FrankChen021 FrankChen021 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have reviewed the code for correctness, edge cases, concurrency, and integration risks; no issues found.

Reviewed 4 of 4 changed files.


This is an automated review by Codex GPT-5.5

@FrankChen021 FrankChen021 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have reviewed the code for correctness, edge cases, concurrency, and integration risks; no issues found.

Reviewed 4 of 4 changed files.


This is an automated review by Codex GPT-5.5

@FrankChen021 FrankChen021 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have reviewed the code for correctness, edge cases, concurrency, and integration risks; no issues found.

Reviewed 4 of 4 changed files.


This is an automated review by Codex GPT-5.5

Bump spotbugs-maven-plugin to 4.10.2.0 (SpotBugs core 4.10.2) and drop the
explicit 4.8.6 core override so the plugin's bundled analyzer is used.

4.10.2 is the first 4.10 release safe to adopt: 4.10.0 was never published
due to a release error, and 4.10.0/4.10.1 shipped a Saxon-HE build that broke
Java 11 compatibility, which 4.10.2 restored.
SpotBugs 4.9 and 4.10 add new detectors. Running spotbugs:check across all
modules surfaced findings from the following new patterns:

- 4.9: AT_* atomicity patterns and HSM_HIDING_METHOD, excluded project-wide
  alongside the existing suppressions (the flagged sites rely on external
  synchronization or hide methods by design).
- 4.10: 70 USO_* unsafe-synchronization findings (CERT LCK00-J) from the new
  FindImproperSynchronization detector, excluded project-wide; Druid relies on
  intrinsic synchronization intentionally.

NN_NAKED_NOTIFY and NCR_NOT_PROPERLY_CHECKED_READ each flag only a handful of
false positives, so they are suppressed with targeted matches rather than
disabled globally, keeping the detectors active for the rest of the codebase.
SpotBugs 4.9 UselessSuppressionDetector flags these two @SuppressFBWarnings
annotations as unnecessary; the underlying patterns are no longer reported at
these sites.
@amaechler amaechler changed the title build(deps): Upgrade SpotBugs to 4.9.3 build(deps): Upgrade to latest SpotBugs Jun 23, 2026

@FrankChen021 FrankChen021 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have reviewed the code for correctness, edge cases, concurrency, and integration risks; no issues found.

Reviewed 4 of 4 changed files.


This is an automated review by Codex GPT-5.5

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.

Really upgrade spotbugs

2 participants