Skip to content

Refactor cumulative counters to AtomicLong and improve wait APIs - #136

Merged
bernardladenthin merged 1 commit into
mainfrom
claude/dependency-updates-audit-vv4mz5
Jul 31, 2026
Merged

Refactor cumulative counters to AtomicLong and improve wait APIs#136
bernardladenthin merged 1 commit into
mainfrom
claude/dependency-updates-audit-vv4mz5

Conversation

@bernardladenthin

Copy link
Copy Markdown
Owner

Summary

  • Changed totalBytesWritten and totalBytesRead from volatile fields to final AtomicLong for safe concurrent read-modify-write operations under concurrent I/O
  • Renamed validation methods: correctOffsetAndLengthToRead/WritevalidateOffsetAndLengthToRead/Write for clarity
  • Replaced deprecated blockDataAvailable() with two new wait methods: waitForAnyData() and waitForAtLeast(long) for more flexible blocking semantics
  • Added getAvailableBytesExact() to return unclamped byte count (unlike available() which caps at Integer.MAX_VALUE)
  • Removed getBufferSize() (legacy method) from public API
  • Updated documentation and test coverage references to reflect API changes
  • Updated Maven and JUnit version requirements in build documentation

Test plan

  • Affected unit / integration tests pass locally
  • CI is green on this branch
  • Docs / CHANGELOG updated where applicable

Related issues / PRs

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)

https://claude.ai/code/session_018WUx9TF8QGQf6efgG5TkHi

…stency audit)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WUx9TF8QGQf6efgG5TkHi
@bernardladenthin
bernardladenthin merged commit eea5dc3 into main Jul 31, 2026
9 of 13 checks passed
@bernardladenthin
bernardladenthin deleted the claude/dependency-updates-audit-vv4mz5 branch July 31, 2026 22:34
@sonarqubecloud

Copy link
Copy Markdown

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