JDK 23 |
---|
23 b02Fixed |
Relates :
|
|
Relates :
|
The compact strings implementation of java.lang.String in StringUTF16.newBytesFor checks the length of non-latin1 strings against MAX_LENGTH. The exception message says "should be less than" is correct but does not match the code. If the length is exactly MAX_LENGTH the array cannot be allocated, throwing java.lang.OutOfMemoryError: Requested array size exceeds VM limit
|