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

Prasanta Sadhukhan prasanta.sadhukhan at oracle.com
Fri Aug 19 05:35:16 UTC 2016


Looks good to me.

Regards
Prasanta
On 8/18/2016 9:34 PM, 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/20160819/1872d7fd/attachment.html>


More information about the 2d-dev mailing list