Skip to content

fix: declare MAX_ARRAY_LENGTH before instance fields (SpotBugs IMC) - #164

Merged
bernardladenthin merged 1 commit into
mainfrom
fix/spotbugs-field-order
Sep 30, 2026
Merged

bernardladenthin merged 1 commit into
mainfrom
fix/spotbugs-field-order

Conversation

@bernardladenthin

Copy link
Copy Markdown
Owner

Summary

  • Fix CI: SpotBugs (fb-contrib) IMC_IMMATURE_CLASS_WRONG_FIELD_ORDER failed spotbugs-check in the verify phase, which broke "Build and analyze". The cause was fix: cap byte[] allocations at MAX_ARRAY_LENGTH (Integer.MAX_VALUE - 8) #163 placing the static constant MAX_ARRAY_LENGTH between instance fields.
  • Moved the constant next to the other static field at the top of the class. No behavior change.

Test plan

Related issues / PRs

Follow-up to #163

Checklist

  • I have read CONTRIBUTING.md and CODE_OF_CONDUCT.md
  • My commits follow Conventional Commits
  • No security-sensitive changes (if there are, I have notified the maintainer privately per SECURITY.md)

🤖 Generated with Claude Code

https://claude.ai/code/session_018mLGtytvtJU7aNshBpnrB5

fb-contrib IMC_IMMATURE_CLASS_WRONG_FIELD_ORDER failed the spotbugs-check
(verify phase) after #163 placed the static constant between instance
fields. Moved it next to the other static field; no behavior change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018mLGtytvtJU7aNshBpnrB5
@sonarqubecloud

Copy link
Copy Markdown

@bernardladenthin
bernardladenthin merged commit affa1fa into main Sep 30, 2026
14 of 18 checks passed
@bernardladenthin
bernardladenthin deleted the fix/spotbugs-field-order branch September 30, 2026 21:39

This branch had an error being deployed

1 failed deployment
startgate — a3e9548e Deployed Sep 30, 2026 by bernardladenthin via Start gate (abort window) #281
maven-central — a3e9548e Deployed Sep 30, 2026 by bernardladenthin via Verify GPG signing key (no secrets printed) #281
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.

1 participant