RFR: 8272998: ImageIO.read() throws incorrect exception type

Sergey Bylokhov serb at openjdk.org
Tue Jun 28 19:44:31 UTC 2022


On Mon, 27 Jun 2022 21:57:37 GMT, Phil Race <prr at openjdk.org> wrote:

> A sophisticated app which wants to use ImageReader.read() should be ready to handle those

The current method differs from the "read" only by the "IllegalArgumentException", all other exceptions we will handle here will mean a bug in the read method, which also can be used by the app.

I do not understand why the app should be ready for unexpected/unspecified exceptions in case of "read" method and could not be ready in this one.

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

PR: https://git.openjdk.org/jdk/pull/9113



More information about the client-libs-dev mailing list