Newer
Older
usps-api / TODO.md

TODO

Codebase Analysis (2026-06-18)

  • Bug analysis (security-auditor)
  • Code reuse / duplication analysis (java-architect)
  • Unit test gap analysis (java-tester)
  • Decide which findings to act on with user

Fixes (branch: fix/bugs-reuse-tests)

  • Centralize header generation in BaseService
  • Fix HTTP response resource leaks (try-with-resources everywhere)
  • Use HttpStatusCode enum consistently in OauthService
  • Cache ObjectMapper in BaseService (was rebuilt per call)
  • Fix typos in public API params (cliendId, adderss)
  • Fix wrong fixture in RateResponseTest (was loading tracking-response.json)
  • Add service-layer unit tests (mocked HttpClient, all status branches)
  • Add tests for utils/enums/AuthToken
  • Migrate existing tests to JUnit 5
  • Check HTTP status before parsing response body (checkForError helper)
  • Avoid capturing access_token in Debug object (redaction in OauthService.debug)
  • Run full build and test suite (38 tests passing, mvn package green) --> All planned fixes complete; not yet committed

Notes

  • Project: USPS API Java client (io.ljunggren.usps.api)
  • 32 main java files, Maven build