Skip to content

Conversation

@tal5
Copy link
Contributor

@tal5 tal5 commented Jul 7, 2025

Adds methods to create ListBinaryTag and CompoundBinaryTag builders with an initial capacity.

Added an int initialCapacity field to both builder impls that defaults to -1.
When creating the backing list/map, the builders now use initialCapacity if it isn't -1.
For the builder impl constructors, I just overloaded them and added initialCapcity, as I didn't want to specify the -1 outside the impl class/change the existing ones - lmk if that's actually fine and should be changed.

image

@kezz kezz added this to the 4.25.0 milestone Oct 6, 2025
@kezz kezz self-assigned this Oct 6, 2025
Copy link
Member

@kezz kezz left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Just made a few minor style adjustments, but all good to go.

@kezz kezz added this pull request to the merge queue Oct 6, 2025
Merged via the queue into PaperMC:main/4 with commit 2bae187 Oct 6, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants