On Tue, 23 Jul 2024 12:56:07 GMT, Shaojin Wen <s...@openjdk.org> wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this >> simple scenario, it can be implemented in a simpler way and can improve >> performance. > > Shaojin Wen has updated the pull request incrementally with one additional > commit since the last revision: > > reduce change Looks like this changes regressed behavior on long Strings: String r1 = "-".repeat(Integer.MAX_VALUE - 10); String r2 = "ы".repeat((Integer.MAX_VALUE - 10) / 2); System.out.println(r1.concat(r2)); This code now throws `StringIndexOutOfBoundsException` instead of `OutOfMemoryError` ------------- PR Comment: https://git.openjdk.org/jdk/pull/20253#issuecomment-2850196722