On Fri, 5 Apr 2024 17:44:38 GMT, Roger Riggs <rri...@openjdk.org> wrote:

> When encoding a vary large string in String.getBytes(StandardCharset.UTF_8) 
> computation of the buffer size may exceed the range of a positive 32-bit 
> Integer.
> If the estimated size for the result byte array is too large, pre-compute the 
> exact buffer size. 
> If that exceeds the range, then throw OutOfMemoryError.

Marked as reviewed by rgiulietti (Reviewer).

-------------

PR Review: https://git.openjdk.org/jdk/pull/18663#pullrequestreview-1986623356

Reply via email to