On Mon, 24 Jul 2023 12:59:55 GMT, Alan Bateman <al...@openjdk.org> wrote:
>> Limit native memory allocation and move write loop from the native layer >> into Java. This change should make the OOME reported in the issue much less >> likely. > > src/java.base/share/classes/java/io/FileOutputStream.java line 366: > >> 364: int n = writeBytes(b, off, len, append); >> 365: if (n == -1) >> 366: break; > > Checking if n is -1 doesn't look right here. Isn't return -1 just to keep the > compiler happy when an exception is thrown. This is a copy-paste vestige; will remove. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14981#discussion_r1272919429