Hi,

I was recently looking at subclassing `ByteArrayOutputStream` in an
application so that I could add a fast VarHandle-based `writeLong(long)`
method (writing 8 bytes to the byte array in one go). The
internal `ByteArrayOutputStream` buffer is protected, so no issue there,
but `ensureCapacity(int)` is private rather than protected, and uses the
internal `ArraysSupport` class, so it's not even easy to copy/paste as
duplicate code in the subclass. Similar `ensureCapacity` methods in
`ArrayList` and `StringBuilder` are public. Would a PR adjusting the
visibility of this method from private to protected be accepted?

Take care,

Daniel

Reply via email to