Skip to content

Conversation

@ic0ns
Copy link
Contributor

@ic0ns ic0ns commented Jun 30, 2025

Summary

  • Fixed SpotBugs warnings about methods with Boolean return type returning explicit null
  • Added SpotBugs annotations dependency to suppress these warnings
  • Applied suppressions to BooleanExplicitValueModification and BooleanToggleModification

Details

The SpotBugs tool was reporting NP_BOOLEAN_RETURN_NULL warnings for the modifyImplementationHook methods in both BooleanExplicitValueModification and BooleanToggleModification classes. These methods return null when the input is null, which is intentional behavior to preserve null-safety throughout the modification framework.

The fix adds the SpotBugs annotations dependency and uses @SuppressFBWarnings to suppress these specific warnings with appropriate justification.

Test plan

  • Verified that existing tests pass (they already test null handling)
  • Ran SpotBugs to confirm the warnings are resolved
  • Applied spotless formatting

- Added SpotBugs annotations dependency
- Suppressed NP_BOOLEAN_RETURN_NULL warnings in BooleanExplicitValueModification and BooleanToggleModification
- The null returns are intentional to preserve null-safety in the modification framework
- Tests already verify the null handling behavior
@ic0ns ic0ns closed this Jun 30, 2025
@ic0ns ic0ns deleted the fix/boolean-null-return-issue branch June 30, 2025 09:57
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