Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MutableDirectBuffer methods to put string could accept CharSequence #240

Merged
merged 4 commits into from
Jul 4, 2021
Merged

MutableDirectBuffer methods to put string could accept CharSequence #240

merged 4 commits into from
Jul 4, 2021

Conversation

tkowalcz
Copy link
Contributor

@tkowalcz tkowalcz commented Jul 2, 2021

This PR addresses #238 and contains following changes:

  1. Modified MutableDirectBuffer class. Added putStringAscii and putStringWithoutLengthAscii versions that accept CharSequence instead of String.
  2. Implemented them in all subclasses: UnsafeBuffer, ExpandableArrayBuffer, ExpandableDirectByteBuffer.
  3. Implementations are copied from String versions verbatim.
  4. Added tests in places that contained tests for string versions.
  5. Added BufferCharSequenceOperationsTest that is based on BufferStringOperationsTest.
  6. Added simple JMH microbenchmark.

I don't want to seem lazy but these are all changes I was able to come up with to support CharSequence-s.

@mjpt777 mjpt777 merged commit 1c75937 into aeron-io:master Jul 4, 2021
mjpt777 added a commit that referenced this pull request Jul 4, 2021
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