Commits


David Li authored and GitHub committed 1ab00aefb49
GH-35960: [Java] Detect overflow in allocation (#36185) ### Rationale for this change The Java allocator wasn't detecting overflow (which is admittedly a corner case since you can't actually allocate that many bytes), causing an unexpected exception. ### What changes are included in this PR? Detect overflow and provide the right exception. ### Are these changes tested? Yes ### Are there any user-facing changes? No * Closes: #35960 Authored-by: David Li <li.davidm96@gmail.com> Signed-off-by: David Li <li.davidm96@gmail.com>