On Wed, 5 May 2021 06:50:17 GMT, Vladimir Sitnikov <vsitni...@openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8264777: Handle cases where length() returns zero > > src/java.base/share/classes/java/io/FileInputStream.java line 284: > >> 282: long size = length - position; >> 283: if (size > (long)Integer.MAX_VALUE) >> 284: throw new OutOfMemoryError("Required array size too >> large"); > > What do you think of adding "length, position, and size" to the exception > message? We usually don't do that for OutOfMemoryError because concatenation implies allocation ------------- PR: https://git.openjdk.java.net/jdk/pull/3845