[OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream
Jayathirth D V
jayathirth.d.v at oracle.com
Wed Mar 16 05:50:56 UTC 2016
Hi Phil,All
Please review the following fix in JDK9:
Bug : https://bugs.openjdk.java.net/browse/JDK-8044289
Webrev : http://cr.openjdk.java.net/~jdv/8044289/webrev.00/
Issue : When createImageInputStream() or createImageOutputStream returns null in ImageIO.read() or ImageIO.write() we are seeing NPE as it stream is used further without null check.
Root cause : "stream" is used without checking whether it is null or not.
Solution : Handle null pointer of stream and throw IIOException.
Test case contains all possible scenarios where createImageInputStream() or createImageOutputStream can return null.
Thanks,
Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20160315/873fc98a/attachment.html>
More information about the 2d-dev
mailing list