Skip to content

Conversation

ic0ns
Copy link
Contributor

@ic0ns ic0ns commented Jun 30, 2025

Summary

  • Fixed 38 static method warnings by adding the static keyword to test methods that don't use instance state
  • Removed unused variable assignment in ModifiableByteTest (line 201)
  • Added this. qualifier to field accesses in ModifiableIntegerTest (7 occurrences)

Changes Made

Static Method Warnings (38 methods)

Added static keyword to test methods across 24 test files:

  • ByteArray tests: 9 methods
  • BigInteger tests: 7 methods
  • Utility tests: 5 methods
  • Long tests: 3 methods
  • Core tests: 4 methods
  • Boolean tests: 2 methods
  • String tests: 8 methods

Unused Variable Warning

  • Removed unused assignment of nullByteHash in ModifiableByteTest.java:201

Unqualified Field Access Warnings

  • Added this. prefix to all 7 occurrences of nullInteger field access in ModifiableIntegerTest.java

Test plan

  • All existing tests pass
  • Code compiles without warnings
  • Spotless formatting applied

- Add static keyword to 38 test methods that don't use instance state
- Remove unused variable assignment in ModifiableByteTest
- Add 'this.' qualifier to field accesses in ModifiableIntegerTest

These changes address all null analysis warnings reported in issue #28:
- Methods that can be declared static
- Unused local variable
- Unqualified field access
@ic0ns ic0ns closed this Jun 30, 2025
@ic0ns ic0ns deleted the fix-null-analysis-warnings-new branch June 30, 2025 09: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.

1 participant