<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>I am not against doCompare() changes. I am just saying run()
      changes are not needed.<br>
    </p>
    Regards<br>
    Prasanta<br>
    <div class="moz-cite-prefix">On 26-Nov-18 9:15 PM, Shashidhara
      Veerabhadraiah wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:4f503ddf-6dce-4e0b-aee5-d249932f0a7d@default">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:PMingLiU;
        panose-1:2 1 6 1 0 1 1 1 1 1;}
@font-face
        {font-family:Tunga;
        panose-1:0 0 4 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"\@PMingLiU";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
span.new
        {mso-style-name:new;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:#1F497D">There is a
            possible case and that is the reason for this fix. The
            possible states for prevRemotePinters and
            currentRemotePrinters are null and valid values and they can
            reach those states at any time either because of network
            disconnect or any other OS related changes. With that in
            mind, this fix tries to eliminate the possible NPE cases.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">Thanks and
            regards,<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">Shashi<o:p></o:p></span></p>
        <p class="MsoNormal"><a name="_MailEndCompose"
            moz-do-not-send="true"><span style="color:#1F497D"><o:p> </o:p></span></a></p>
        <div>
          <div style="border:none;border-top:solid #E1E1E1
            1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span
                style="color:windowtext"> Prasanta Sadhukhan <br>
                <b>Sent:</b> Monday, November 26, 2018 8:01 PM<br>
                <b>To:</b> Shashidhara Veerabhadraiah
                <a class="moz-txt-link-rfc2396E" href="mailto:shashidhara.veerabhadraiah@oracle.com"><shashidhara.veerabhadraiah@oracle.com></a>;
                <a class="moz-txt-link-abbreviated" href="mailto:swing-dev@openjdk.java.net">swing-dev@openjdk.java.net</a>; <a class="moz-txt-link-abbreviated" href="mailto:2d-dev@openjdk.java.net">2d-dev@openjdk.java.net</a><br>
                <b>Subject:</b> Re: [OpenJDK 2D-Dev] [12] JDK-8212202:
                NPE in the print tests after JDK-8153732<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p><span style="font-size:12.0pt"><o:p> </o:p></span></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <div>
          <p class="MsoNormal">On 26-Nov-18 6:51 PM, <a
              href="mailto:shashidhara.veerabhadraiah@oracle.com"
              moz-do-not-send="true">shashidhara.veerabhadraiah@oracle.com</a>
            wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p>Hi Prasanta, I think we should not create a behavior across
            the functions. doCompare() does only the comparison and it
            may be used for other purposes and is complete with respect
            to the comparison functionality.<o:p></o:p></p>
          <p>run() function has a different behavior as it needs to
            populate the prevRemotePrinters and then the
            currentRemotePrinters and then use the comparison
            functionality. I think this is a good way to do.<o:p></o:p></p>
        </blockquote>
        <p class="MsoNormal">Even without the if-else check, it does
          populates the prevRemotePrinters, no? <br>
          if "prevRemotePrinters" is null and currentRemotePrinters is
          null, then no need to update. If currentRemotePrinters is
          null, then what is the point of using getRemotePrintersNames()
          to update prevRemotePrinters as currentRemotePrinters is also
          obtained from getRemotePrintersNames!!<br>
          If "prevRemotePrinters" is null and currentRemotePrinters is
          not null, then doCompare() called from run() will be true and
          prevRemotePrinters will be populated with
          currentRemotePrinters.<br>
          If "prevRemotePrinters" is not null and currentRemotePrinters
          is null, then also prevRemotePrinters will be populated with
          currentRemotePrinters.<br>
          <br>
          Regards<br>
          Prasanta<br>
          <br>
          <o:p></o:p></p>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p>Thanks and regards,<o:p></o:p></p>
          <p>Shashi<o:p></o:p></p>
          <p class="MsoNormal"><o:p> </o:p></p>
          <div>
            <p class="MsoNormal">On 26/11/18 6:03 PM, Prasanta Sadhukhan
              wrote:<o:p></o:p></p>
          </div>
          <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
            <p>Hi Shashi,<o:p></o:p></p>
            <p class="MsoNormal">I think l437 check of if-else <span
                class="new"><b><span
                    style="font-size:10.0pt;font-family:Consolas;color:blue">if
                    (prevRemotePrinters != null) {</span></b></span><span
                style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
            <p class="MsoNormal"><span
                style="font-size:10.0pt;font-family:Consolas"><o:p> </o:p></span></p>
            <p class="MsoNormal">is not required. prevRemotePrinters
              null check is addressed in str1==null case in doCompare().<br>
              If prevRemotePrinters is null and currentRemotePrinters is
              not null, then you update prevRemotePrinters to
              currentRemotePrinters as per l415 where doCompare returns
              true.<br>
              Also, If prevRemotePrinters is not null and
              currentRemotePrinters is null, then also you update
              prevRemotePrinters to currentRemotePrinters which is the
              output of getRemotePrintersNames().<br>
              <br>
              Regards<br>
              Prasanta<br>
              <br>
              <o:p></o:p></p>
            <div>
              <p class="MsoNormal">On 26-Nov-18 2:33 PM, Shashidhara
                Veerabhadraiah wrote:<o:p></o:p></p>
            </div>
            <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
              <p class="MsoNormal">Hi All, Please review a NPE fix for
                the below bug.<o:p></o:p></p>
              <p class="MsoNormal"> <o:p></o:p></p>
              <p class="MsoNormal">Bug: <a
                  href="https://bugs.openjdk.java.net/browse/JDK-8212202"
                  moz-do-not-send="true">https://bugs.openjdk.java.net/browse/JDK-8212202</a><o:p></o:p></p>
              <p class="MsoNormal"> <o:p></o:p></p>
              <p class="MsoNormal">Webrev: <a
                  href="http://cr.openjdk.java.net/%7Esveerabhadra/8212202/webrev.00/"
                  moz-do-not-send="true">http://cr.openjdk.java.net/~sveerabhadra/8212202/webrev.00/</a><o:p></o:p></p>
              <p class="MsoNormal"> <o:p></o:p></p>
              <p class="MsoNormal">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.<o:p></o:p></p>
              <p class="MsoNormal"> <o:p></o:p></p>
              <p class="MsoNormal">Thanks and regards,<o:p></o:p></p>
              <p class="MsoNormal">Shashi<o:p></o:p></p>
            </blockquote>
            <p class="MsoNormal"><span
                style="font-size:12.0pt;font-family:"Times New
                Roman",serif"><o:p> </o:p></span></p>
          </blockquote>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;font-family:"Times New
              Roman",serif"><o:p> </o:p></span></p>
        </blockquote>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman",serif"><o:p> </o:p></span></p>
      </div>
    </blockquote>
    <br>
  </body>
</html>