[OpenJDK 2D-Dev] [12] JDK-8212202: NPE in the print tests after JDK-8153732

Prasanta Sadhukhan prasanta.sadhukhan at oracle.com
Mon Nov 26 12:33:45 UTC 2018

Hi Shashi,

I think l437 check of if-else if (prevRemotePrinters != null) {is not 
required. prevRemotePrinters null check is addressed in str1==null case 
in doCompare().
If prevRemotePrinters is null and currentRemotePrinters is not null, 
then you update prevRemotePrinters to currentRemotePrinters as per l415 
where doCompare returns true.
Also, If prevRemotePrinters is not null and currentRemotePrinters is 
null, then also you update prevRemotePrinters to currentRemotePrinters 
which is the output of getRemotePrintersNames().

On 26-Nov-18 2:33 PM, Shashidhara Veerabhadraiah wrote:
> Hi All, Please review a NPE fix for the below bug.
> Bug: https://bugs.openjdk.java.net/browse/JDK-8212202
> Webrev: http://cr.openjdk.java.net/~sveerabhadra/8212202/webrev.00/ 
> <http://cr.openjdk.java.net/%7Esveerabhadra/8212202/webrev.00/>
> Function getRemotePrintersNames() may return null values and hence 
> they need to be handled from the caller of that function which was 
> missing earlier. This fix handles the null return values of the said 
> function.
> Thanks and regards,
> Shashi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20181126/9c657441/attachment.html>

More information about the 2d-dev mailing list