Skip to content

GH-141: Correct capacity behavior in BufferAllocator.buffer docstrings#1010

Merged
jbonofre merged 1 commit intoapache:mainfrom
axreldable:buf-docstr-fix
Feb 8, 2026
Merged

GH-141: Correct capacity behavior in BufferAllocator.buffer docstrings#1010
jbonofre merged 1 commit intoapache:mainfrom
axreldable:buf-docstr-fix

Conversation

@axreldable
Copy link
Contributor

What's Changed

Update the BufferAllocator.buffer(long) and BufferAllocator.buffer(long, BufferManager) docstrings so they match the actual behavior: the returned buffer’s capacity is the allocated (possibly rounded) size, not the requested size. The previous text said the capacity would be set to the configured size, which was incorrect. The new text also mentions that callers can use ArrowBuf#capacity(long) to set the capacity to the requested size when needed.

Documentation-only change; no code or behavioral changes.

Closes #141.

@github-actions

This comment has been minimized.

@axreldable
Copy link
Contributor Author

I'm not able to set the documentation label in the PR.

@lidavidm lidavidm added the documentation PRs that improve documentation. label Feb 8, 2026
@github-actions github-actions bot added this to the 19.0.0 milestone Feb 8, 2026
Copy link
Member

@jbonofre jbonofre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a nit, but good one.

@jbonofre jbonofre merged commit 776466e into apache:main Feb 8, 2026
22 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation PRs that improve documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Java] Allocator buffer method no setting the capacity correctly.

3 participants