Skip to content

fix(flagd): make FlagdThreadFactory final for SpotBugs 4.10 - #1899

Merged
toddbaert merged 1 commit into
mainfrom
fix/spotbugs-4.10-ct-throw
Oct 22, 2026
Merged

toddbaert merged 1 commit into
mainfrom
fix/spotbugs-4.10-ct-throw

Conversation

@aepfli

@aepfli aepfli commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

SpotBugs 4.10.4 (#1897) reports CT_CONSTRUCTOR_THROW on FlagdThreadFactory: the requireNonNull in the constructor can throw. The class is package-private and never subclassed, so making it final clears the finding without a behaviour change.

Unblocks #1897. Verified locally against the #1897 branch: SpotBugs reports 0 bugs for the flagd modules.

SpotBugs 4.10 reports CT_CONSTRUCTOR_THROW for the null check in the
constructor. The class is package-private and never subclassed, so
making it final removes the finalizer-attack surface the check is about.

Signed-off-by: Simon Schrottner <simon.schrottner@flagsmith.com>
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3879c5ad-e8a6-44a6-8ff3-16b9fec0ed8c
📥 Commits

Reviewing files that changed from the base of the PR and between f842a72 and b4a937d.

📒 Files selected for processing: 1
  • providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/FlagdThreadFactory.java

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

FlagdThreadFactory is now declared final with package-private access. Its implementation is unchanged.

Changes: Flagd thread factory

Layer / File(s) Summary
Update factory declaration
providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/FlagdThreadFactory.java
The class declaration adds the final modifier. Its behavior is unchanged.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Bug fix

Suggested reviewers: toddbaert

Merge Risk: ⚪ Minimal · up to b4a93

The change only prevents subclassing; the repository’s provider and tests construct the factory directly, so no concrete merge blocker is established.

Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly identifies the main change: making FlagdThreadFactory final to address SpotBugs 4.10 findings.
Description check Passed The description explains the SpotBugs finding, the reason for the change, the expected behavior impact, and the local verification result.
✨ Finishing Touches: 💡 1
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@aepfli
aepfli requested a review from chrfwow October 14, 2026 16:39
@toddbaert
toddbaert merged commit a91a790 into main Oct 22, 2026
8 of 9 checks passed
@toddbaert
toddbaert deleted the fix/spotbugs-4.10-ct-throw branch October 22, 2026 18:45
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.

5 participants