RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available [v2]

Brian Burkhalter bpb at openjdk.org
Tue Jul 25 23:50:07 UTC 2023


On Tue, 25 Jul 2023 02:05:52 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> 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.

Removed in 973e848a84113f8d6eb65702a148138f2edca1ee.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14981#discussion_r1274219972


More information about the security-dev mailing list