[OpenJDK 2D-Dev] [9] RFR JDK-8163258 : Getting NullPointerException from ImageIO.getReaderWriterInfo due to failure to check for null
Jayathirth D V
jayathirth.d.v at oracle.com
Thu Aug 18 16:04:53 UTC 2016
Hi,
Please review the following fix in JDK9 at your convenience:
Bug : https://bugs.openjdk.java.net/browse/JDK-8163258
Webrev : http://cr.openjdk.java.net/~jdv/8163258/webrev.00/
Issue : When we call ImageIO.getReaderMIMETypes() or ImageIO. getFileSuffixes() with MIMEType or FileSuffix as null in subclass ImageReaderSpi it throws NullPointerException.
Root cause : We allow MIMEType and FileSuffix to be null in ImageReaderWriterSpi. But when we call getReaderMIMETypes() or getFileSuffixes() we try populate HashSet using Collections.addALL() which throws NPE.
Solution : Before we populate HashSet using Collections.addALL() verify whether the input is null.
Thanks,
Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20160818/0c4277f8/attachment.html>
More information about the 2d-dev
mailing list