RFR: 4617681: constructor of BufferedImage throws unexpected IllegalArgumentException
Sergey Bylokhov
serb at openjdk.org
Wed Oct 8 00:58:02 UTC 2025
On Wed, 8 Oct 2025 00:00:26 GMT, Phil Race <prr at openjdk.org> wrote:
>If someone used different storage the clause would still be accurate even if there were no actual examples of it left.
I still would like to clarify, how the next statement could be correct if another storage is in use?
> IllegalArgumentException if the multiplication product of
* {@code width}, {@code height}, and the number of samples per pixel
* for the specified format exceeds the maximum length of a Java array.
It is strictly required to throw this exception here and there, even if we will split the data across two arrays.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27640#discussion_r2412261516
More information about the client-libs-dev
mailing list