On Tue, 6 Jan 2026 10:30:00 GMT, David Beaumont <[email protected]> wrote:
>> Only needs to check for the `Integer.MAX_VALUE` in any case, as >> `ByteBuffer::allocateDirect` throws on `size < 0`. It also uses IAE > > Fair points. This is just moved code, but IOOBE is clearly not the right > choice here. In fact, taking a more holistic view, the size check is already done by the caller, so there's some nice simplification possible here. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29043#discussion_r2664504433
