On Mon, 22 Jan 2024 20:52:32 GMT, Roger Riggs <rri...@openjdk.org> wrote:

> When an exception handler for an OutOfMemoryError uses string concatenation 
> to compose an exception message, the invoke dynamic string format 
> implementation may itself exhaust memory, preventing the exception from being 
> handled.
> Explicit use of String.concat() call can improve exception handling.
> 
> Writing a test of the exact failure condition has proved challenging due to 
> the unpredictable state of memory when OOME occurs. The replacement of "+" 
> with String.concat() is simple and direct.

Marked as reviewed by naoto (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/17522#pullrequestreview-1842551871

Reply via email to