[OpenJDK 2D-Dev] [9] RFR JDK-8163258 : Getting NullPointerException from ImageIO.getReaderWriterInfo due to failure to check for null

Philip Race philip.race at oracle.com
Thu Aug 18 21:52:32 UTC 2016


+1

-phil

On 8/18/16, 9:04 AM, Jayathirth D V wrote:
>
> 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/ 
> <http://cr.openjdk.java.net/%7Ejdv/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/0d0ea19a/attachment.html>


More information about the 2d-dev mailing list