RFR: 8374610: Make ByteArrayOutputStream.ensureCapacity(int) protected
Daniel Gredler
dgredler at openjdk.org
Fri Jan 16 12:45:58 UTC 2026
On Fri, 16 Jan 2026 12:31:09 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> With the current proposal I can extend BAOS, override ensureCapacity, but it wouldn't be called when using the existing methods to write.
True. I'll tweak the PR to address this and see how it looks.
What would you think about renaming the method to `setMinCapacity` in order to reduce conflict risk? Roger's point about reduced visibility conflicts is a good one, given the established use of the `ensureCapacity` name.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29180#issuecomment-3759861538
More information about the core-libs-dev
mailing list