<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>you are using in java<br>
    </p>
    <pre><span class="new">409             prevRemotePrinters = GetRemotePrintersNames();
</span><span class="new">431                 String[] currentRemotePrinters = GetRemotePrintersNames();</span>
<span class="new"></span></pre>
    <br>
    while you are at it, please change <br>
    <pre><span class="new">269                 if (info4->Attributes & 0x00000010) {
to
</span><span class="new"><span class="new">if (info4->Attributes & PRINTER_ATTRIBUTE_NETWORK) {</span>

 as the hardcoded value might change in future.

Regards
Prasanta
</span></pre>
    <div class="moz-cite-prefix">On 6/22/2018 2:32 PM, Shashidhara
      Veerabhadraiah wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:43ae5453-758f-41c9-a09a-b05e25a2994a@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";}
@font-face
        {font-family:"Times New Roman \,serif";
        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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.new
        {mso-style-name:new;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle24
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle25
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle26
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle27
        {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">Hi Prasanta,
            Here is the new webrev for that change:<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><a
              href="http://cr.openjdk.java.net/%7Esveerabhadra/8153732/webrev.06/"
              moz-do-not-send="true">http://cr.openjdk.java.net/~sveerabhadra/8153732/webrev.06/</a><o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><a name="_MailEndCompose"
            moz-do-not-send="true"><span style="color:#1F497D">Thanks
              and regards,<o:p></o:p></span></a></p>
        <p class="MsoNormal"><span style="color:#1F497D">Shashi<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></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> Friday, June 22, 2018 2:00 PM<br>
                <b>To:</b> Shashidhara Veerabhadraiah
                <a class="moz-txt-link-rfc2396E" href="mailto:shashidhara.veerabhadraiah@oracle.com"><shashidhara.veerabhadraiah@oracle.com></a>; Philip
                Race <a class="moz-txt-link-rfc2396E" href="mailto:philip.race@oracle.com"><philip.race@oracle.com></a>; 2d-dev
                <a class="moz-txt-link-rfc2396E" href="mailto:2d-dev@openjdk.java.net"><2d-dev@openjdk.java.net></a><br>
                <b>Subject:</b> Re: [OpenJDK 2D-Dev] <Swing Dev>
                [11] JDK-8153732: Windows remote printer changes do not
                reflect in lookupPrintServices()<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p>btw, <span style="font-size:12.0pt"><o:p></o:p></span></p>
        <pre><span class="new">GetRemotePrintersNames <o:p></o:p></span></pre>
        <pre><span class="new">violates camelcase style. I suggest to use </span>g<span class="new">etRemotePrintersNames</span><o:p></o:p></pre>
        <p class="MsoNormal"><br>
          Regards<br>
          Prasanta<o:p></o:p></p>
        <div>
          <p class="MsoNormal">On 6/22/2018 1:56 PM, Shashidhara
            Veerabhadraiah wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal"><span style="color:#1F497D">Thank you
              Prasanta for the review.</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D">Thanks and
              regards,</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D">Shashi</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></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> Friday, June 22, 2018 1:42 PM<br>
                  <b>To:</b> Shashidhara Veerabhadraiah <a
                    href="mailto:shashidhara.veerabhadraiah@oracle.com"
                    moz-do-not-send="true"><shashidhara.veerabhadraiah@oracle.com></a>;
                  Philip Race <a href="mailto:philip.race@oracle.com"
                    moz-do-not-send="true"><philip.race@oracle.com></a>;
                  2d-dev <a href="mailto:2d-dev@openjdk.java.net"
                    moz-do-not-send="true"><2d-dev@openjdk.java.net></a><br>
                  <b>Subject:</b> Re: [OpenJDK 2D-Dev] <Swing Dev>
                  [11] JDK-8153732: Windows remote printer changes do
                  not reflect in lookupPrintServices()</span><o:p></o:p></p>
            </div>
          </div>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p>looks good. One more thing, you could probably use<o:p></o:p></p>
          <pre><span class="new">if (info4->Attributes & PRINTER_ATTRIBUTE_NETWORK) {</span><o:p></o:p></pre>
          <p>instead of hardcoding<o:p></o:p></p>
          <pre><span class="new">if (info4->Attributes & 0x00000010) {</span><o:p></o:p></pre>
          <p class="MsoNormal"><br>
            Also, <o:p></o:p></p>
          <pre>getAllPrinterNames() shares more than 80% code with your recently added <span class="new">GetRemotePrintersNames(). Probably we could optimise getAllPrinterNames to use yours</span><o:p></o:p></pre>
          <pre><span class="new">by having a parameter(all/remote) but it's upto you.</span><o:p></o:p></pre>
          <pre><span class="new"> </span><o:p></o:p></pre>
          <pre><span class="new">Regards</span><o:p></o:p></pre>
          <pre><span class="new">Prasanta</span><o:p></o:p></pre>
          <div>
            <p class="MsoNormal">On 6/22/2018 12:53 PM, Shashidhara
              Veerabhadraiah wrote:<o:p></o:p></p>
          </div>
          <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
            <p class="MsoNormal"><span style="color:#1F497D">Hi
                Prasanta, Thank you for the review. Here is the new
                Webrev:</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"><a
                  href="http://cr.openjdk.java.net/%7Esveerabhadra/8153732/webrev.05/"
                  moz-do-not-send="true">http://cr.openjdk.java.net/~sveerabhadra/8153732/webrev.05/</a></span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D">For the
                EnumPrinters case, I think the cReturned is sufficient
                as it is set to zero every time we start.</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D">Thanks and
                regards,</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D">Shashi</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></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> Friday, June 22, 2018 10:41 AM<br>
                    <b>To:</b> Shashidhara Veerabhadraiah <a
                      href="mailto:shashidhara.veerabhadraiah@oracle.com"
                      moz-do-not-send="true"><shashidhara.veerabhadraiah@oracle.com></a>;
                    Philip Race <a href="mailto:philip.race@oracle.com"
                      moz-do-not-send="true"><philip.race@oracle.com></a>;
                    2d-dev <a href="mailto:2d-dev@openjdk.java.net"
                      moz-do-not-send="true"><2d-dev@openjdk.java.net></a><br>
                    <b>Subject:</b> Re: [OpenJDK 2D-Dev] <Swing
                    Dev> [11] JDK-8153732: Windows remote printer
                    changes do not reflect in lookupPrintServices()</span><o:p></o:p></p>
              </div>
            </div>
            <p class="MsoNormal"> <o:p></o:p></p>
            <p>I guess<o:p></o:p></p>
            <pre><span class="new">if (pollStr.equalsIgnoreCase("true")) {</span><o:p></o:p></pre>
            <pre><span class="new">  70                 pollServices = true;</span><o:p></o:p></pre>
            <pre><span class="new">  71             } else if (pollStr.equalsIgnoreCase("false")) {</span><o:p></o:p></pre>
            <pre><span class="new">  72                 pollServices = false;</span><o:p></o:p></pre>
            <pre><span class="new">  73             }</span><o:p></o:p></pre>
            <pre><span class="new">can be written as</span><o:p></o:p></pre>
            <pre> <o:p></o:p></pre>
            <pre><span class="new">if (pollStr.equalsIgnoreCase("false")) </span><o:p></o:p></pre>
            <pre><span class="new">pollServices = false;</span><o:p></o:p></pre>
            <pre><span class="new"> </span><o:p></o:p></pre>
            <pre><span class="new">as it is already defaulted to true.</span><o:p></o:p></pre>
            <p class="MsoNormal"> <o:p></o:p></p>
            <pre><span class="new">78          * for polling PrintServices.  The default is 120.</span><o:p></o:p></pre>
            <p class="MsoNormal">I guess default is 240.<br>
              <br>
              also, EnumPrinters returns bool, which we should check
              like<o:p></o:p></p>
            <pre><span class="new">263         if (cReturned > 0 && enumprintersret !=0 ) {</span><o:p></o:p></pre>
            <pre><span class="new"> </span><o:p></o:p></pre>
            <pre><span class="new">Regards</span><o:p></o:p></pre>
            <pre><span class="new">Prasanta</span><o:p></o:p></pre>
            <div>
              <p class="MsoNormal">On 6/22/2018 10:03 AM, Shashidhara
                Veerabhadraiah wrote:<o:p></o:p></p>
            </div>
            <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
              <p class="MsoNormal"><span style="color:#1F497D">Hi Phil,
                  Thanks for your review.</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D">I have
                  made your suggested changes and here is the updated
                  webrev:</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D"><a
                    href="http://cr.openjdk.java.net/%7Esveerabhadra/8153732/webrev.04/"
                    moz-do-not-send="true">http://cr.openjdk.java.net/~sveerabhadra/8153732/webrev.04/</a></span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D">Need one
                  more review to commit this.</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D">Note: A
                  network printer can be added via the ‘Add a printer’
                  under the ‘Devices and Printers’ dialog. A network
                  printer will have the property ‘Device description’
                  set to ‘Network printer connection’.</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D">Thanks
                  and regards,</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D">Shashi</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></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"> Phil Race <br>
                      <b>Sent:</b> Friday, June 22, 2018 2:16 AM<br>
                      <b>To:</b> Shashidhara Veerabhadraiah <a
                        href="mailto:shashidhara.veerabhadraiah@oracle.com"
                        moz-do-not-send="true"><shashidhara.veerabhadraiah@oracle.com></a>;
                      2d-dev <a href="mailto:2d-dev@openjdk.java.net"
                        moz-do-not-send="true"><2d-dev@openjdk.java.net></a><br>
                      <b>Subject:</b> Re: <Swing Dev> [11]
                      JDK-8153732: Windows remote printer changes do not
                      reflect in lookupPrintServices()</span><o:p></o:p></p>
                </div>
              </div>
              <p class="MsoNormal"> <o:p></o:p></p>
              <p class="MsoNormal">I thought you were going to make the
                refresh time 4 minutes ?<br>
                I don't see that it has to be the same on Windows as it
                was on Unix,<br>
                if you say 4 minutes is a sensible value there .. and 4
                mins will be<br>
                less CPU wake up, so I'd back that (4 mins) ahead of 2
                minutes as the default here.<br>
                <br>
                You still have missing white space<o:p></o:p></p>
              <pre><span class="new"> 432             while(true) {</span><o:p></o:p></pre>
              <p class="MsoNormal" style="margin-bottom:12.0pt"><br>
                With these two changes you have my +1 ..<br>
                <br>
                BTW the native diff looks MUCH better now - thanks !<br>
                <br>
                -phil.<o:p></o:p></p>
              <div>
                <p class="MsoNormal">On 06/21/2018 01:33 PM, Shashidhara
                  Veerabhadraiah wrote:<o:p></o:p></p>
              </div>
              <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
                <p class="MsoNormal"><span style="color:#1F497D">Hi
                    Phil, Here is the new Webrev for changes you
                    suggested.</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"><a
                      href="http://cr.openjdk.java.net/%7Esveerabhadra/8153732/webrev.03/"
                      moz-do-not-send="true">http://cr.openjdk.java.net/~sveerabhadra/8153732/webrev.03/</a></span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D">Thanks
                    and regards,</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D">Shashi</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></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"> Phil Race <br>
                        <b>Sent:</b> Friday, June 22, 2018 1:02 AM<br>
                        <b>To:</b> Shashidhara Veerabhadraiah <a
                          href="mailto:shashidhara.veerabhadraiah@oracle.com"
                          moz-do-not-send="true"><shashidhara.veerabhadraiah@oracle.com></a>;
                        2d-dev <a href="mailto:2d-dev@openjdk.java.net"
                          moz-do-not-send="true"><2d-dev@openjdk.java.net></a><br>
                        <b>Subject:</b> Re: <Swing Dev> [11]
                        JDK-8153732: Windows remote printer changes do
                        not reflect in lookupPrintServices()</span><o:p></o:p></p>
                  </div>
                </div>
                <p class="MsoNormal"> <o:p></o:p></p>
                <pre> <o:p></o:p></pre>
                <pre><span class="new">+        private static final long DELAY = 1000 * 60 * 4; // 4 min pooling</span><o:p></o:p></pre>
                <pre><span class="new"> </span><o:p></o:p></pre>
                <pre><span class="new">I think we need a System Property that can control this.</span><o:p></o:p></pre>
                <pre><span class="new">I suggest the name "sun.java2d.print.minRefreshTime" which is what we use on Unix.</span><o:p></o:p></pre>
                <pre><span class="new"> </span><o:p></o:p></pre>
                <pre><span class="new">and similarly to there we should have "sun.java2d.print.polling" which is a boolean</span><o:p></o:p></pre>
                <pre><span class="new">and controls whether we do this at all ..</span><o:p></o:p></pre>
                <pre><span class="new"> </span><o:p></o:p></pre>
                <pre><span class="new">See src/java.desktop/unix/classes/sun/print/PrintServiceLookupProvider.java</span><o:p></o:p></pre>
                <pre><span class="new"> </span><o:p></o:p></pre>
                <pre><span class="new">Lots of places where you are missing a space before "("</span><o:p></o:p></pre>
                <pre><span class="new"> </span><o:p></o:p></pre>
                <pre><span class="new">+            if(str1.length != str2.length) {</span><o:p></o:p></pre>
                <pre><span class="new">+                for(int i = 0;i < str1.length;i++) {</span><o:p></o:p></pre>
                <pre><span class="new">+                    for(int j = 0;j < str2.length;j++) {</span><o:p></o:p></pre>
                <pre><span class="new">+                        if(!str1[i].equals(str2[j])) {</span><o:p></o:p></pre>
                <pre> <o:p></o:p></pre>
                <pre><span class="new">+            while(true) {</span><o:p></o:p></pre>
                <pre><span class="new">+                if(doCompare(prevRemotePrinters, currentRemotePrinters)) {</span><o:p></o:p></pre>
                <pre><span class="new"> </span><o:p></o:p></pre>
                <pre><span class="new"> </span><o:p></o:p></pre>
                <pre><span class="new">There's some of that in native too</span><o:p></o:p></pre>
                <pre><span class="new"> 266                 if(info4->Attributes & 0x00000010) {</span><o:p></o:p></pre>
                <pre><span class="new"> </span><o:p></o:p></pre>
                <pre><span class="new">In <a href="http://cr.openjdk.java.net/%7Esveerabhadra/8153732/webrev.01/src/java.desktop/windows/native/libawt/windows/WPrinterJob.cpp.sdiff.html" moz-do-not-send="true">http://cr.openjdk.java.net/~sveerabhadra/8153732/webrev.01/src/java.desktop/windows/native/libawt/windows/WPrinterJob.cpp.sdiff.html</a></span><o:p></o:p></pre>
                <pre><span class="new"> </span><o:p></o:p></pre>
                <pre><span class="new">you seem to have moved all the existing and (I think) unchanged related functions so the DIFF appears</span><o:p></o:p></pre>
                <pre><span class="new">much bigger than it really is. Please move them back and re-generate.</span><o:p></o:p></pre>
                <pre><span class="new"> </span><o:p></o:p></pre>
                <pre><span class="new">The test really needs to provide an "out" for someone running the test who has no way</span><o:p></o:p></pre>
                <pre><span class="new">to add a network printer .. they don't want to have to fail the test.</span><o:p></o:p></pre>
                <pre><span class="new"> </span><o:p></o:p></pre>
                <pre><span class="new">As well as that, arguably this should be an @ignore test, so it is not run unless</span><o:p></o:p></pre>
                <pre><span class="new">you are trying to run all the tests.</span><o:p></o:p></pre>
                <pre><span class="new"> </span><o:p></o:p></pre>
                <pre><span class="new">-phil.</span><o:p></o:p></pre>
                <div>
                  <p class="MsoNormal">On 06/21/2018 12:08 PM,
                    Shashidhara Veerabhadraiah wrote:<o:p></o:p></p>
                </div>
                <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
                  <p class="MsoNormal"><span style="color:#1F497D">Hi
                      Phil, Here is the new Webrev. I chose 4 mins
                      because I think it takes around 2 mins to add a
                      new network printer, hence I felt 4 mins is a good
                      time.</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D">The
                      windows *<b>PrinterChangeNotifications</b>* calls
                      are a blocking function calls hence I could not
                      add the remote printers monitor to the existing
                      thread. Hence there is a new thread being added to
                      listen to remote printers status changes.</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D"><a
                        href="http://cr.openjdk.java.net/%7Esveerabhadra/8153732/webrev.01/"
                        moz-do-not-send="true">http://cr.openjdk.java.net/~sveerabhadra/8153732/webrev.01/</a></span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D">Thanks
                      and regards,</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D">Shashi</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></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"> Philip Race <br>
                          <b>Sent:</b> Thursday, June 21, 2018 5:38 AM<br>
                          <b>To:</b> 2d-dev <a
                            href="mailto:2d-dev@openjdk.java.net"
                            moz-do-not-send="true"><2d-dev@openjdk.java.net></a>;
                          Shashidhara Veerabhadraiah <a
                            href="mailto:shashidhara.veerabhadraiah@oracle.com"
                            moz-do-not-send="true"><shashidhara.veerabhadraiah@oracle.com></a><br>
                          <b>Subject:</b> Fwd: Re: <Swing Dev>
                          [11] JDK-8153732: Windows remote printer
                          changes do not reflect in
                          lookupPrintServices()</span><o:p></o:p></p>
                    </div>
                  </div>
                  <p class="MsoNormal"> <o:p></o:p></p>
                  <p class="MsoNormal">The main concern I have is we now
                    have a busy thread burning CPU ..<br>
                    bad for laptops .. and if we add a delay we have
                    less prompt notification<br>
                    of a new local printer.<br>
                    <br>
                    I think the compromise is that the existing thread
                    maybe kept as is,<br>
                    and we add a new thread that pools every 10 minutes
                    for a remote printer.<br>
                    <br>
                    If we can make the existing thread wake up from its
                    wait and do that, even better.<br>
                    <br>
                    -phil.<br>
                    <br>
                    -------- Original Message -------- <o:p></o:p></p>
                  <table class="MsoNormalTable" cellspacing="0"
                    cellpadding="0" border="0">
                    <tbody>
                      <tr>
                        <td style="padding:0in 0in 0in 0in"
                          nowrap="nowrap" valign="top">
                          <p class="MsoNormal" style="text-align:right"
                            align="right"><b>Subject: </b><o:p></o:p></p>
                        </td>
                        <td style="padding:0in 0in 0in 0in">
                          <p class="MsoNormal">Re: [11] JDK-8153732:
                            Windows remote printer changes do not
                            reflect in lookupPrintServices()<o:p></o:p></p>
                        </td>
                      </tr>
                      <tr>
                        <td style="padding:0in 0in 0in 0in"
                          nowrap="nowrap" valign="top">
                          <p class="MsoNormal" style="text-align:right"
                            align="right"><b>Date: </b><o:p></o:p></p>
                        </td>
                        <td style="padding:0in 0in 0in 0in">
                          <p class="MsoNormal">Wed, 20 Jun 2018 17:03:56
                            -0700<o:p></o:p></p>
                        </td>
                      </tr>
                      <tr>
                        <td style="padding:0in 0in 0in 0in"
                          nowrap="nowrap" valign="top">
                          <p class="MsoNormal" style="text-align:right"
                            align="right"><b>From: </b><o:p></o:p></p>
                        </td>
                        <td style="padding:0in 0in 0in 0in">
                          <p class="MsoNormal">Philip Race <a
                              href="mailto:philip.race@oracle.com"
                              moz-do-not-send="true"><philip.race@oracle.com></a><o:p></o:p></p>
                        </td>
                      </tr>
                      <tr>
                        <td style="padding:0in 0in 0in 0in"
                          nowrap="nowrap" valign="top">
                          <p class="MsoNormal" style="text-align:right"
                            align="right"><b>Organization: </b><o:p></o:p></p>
                        </td>
                        <td style="padding:0in 0in 0in 0in">
                          <p class="MsoNormal">Oracle Corporation<o:p></o:p></p>
                        </td>
                      </tr>
                      <tr>
                        <td style="padding:0in 0in 0in 0in"
                          nowrap="nowrap" valign="top">
                          <p class="MsoNormal" style="text-align:right"
                            align="right"><b>To: </b><o:p></o:p></p>
                        </td>
                        <td style="padding:0in 0in 0in 0in">
                          <p class="MsoNormal">Shashidhara
                            Veerabhadraiah <a
                              href="mailto:shashidhara.veerabhadraiah@oracle.com"
                              moz-do-not-send="true"><shashidhara.veerabhadraiah@oracle.com></a><o:p></o:p></p>
                        </td>
                      </tr>
                      <tr>
                        <td style="padding:0in 0in 0in 0in"
                          nowrap="nowrap" valign="top">
                          <p class="MsoNormal" style="text-align:right"
                            align="right"><b>CC: </b><o:p></o:p></p>
                        </td>
                        <td style="padding:0in 0in 0in 0in">
                          <p class="MsoNormal"><a
                              href="mailto:awt-dev@openjdk.java.net"
                              moz-do-not-send="true">awt-dev@openjdk.java.net</a>,
                            <a href="mailto:swing-dev@openjdk.java.net"
                              moz-do-not-send="true">swing-dev@openjdk.java.net</a><o:p></o:p></p>
                        </td>
                      </tr>
                    </tbody>
                  </table>
                  <p class="MsoNormal"><br>
                    <br>
                    This is on the wrong lists. Not Swing. Not AWT.
                    Should be 2d.<br>
                    I'll forward it there and continue there. Consider
                    the AWT+Swing threads dead.<br>
                    <br>
                    -phil.<br>
                    <br>
                    On 6/20/18, 3:12 AM, Shashidhara Veerabhadraiah
                    wrote: <o:p></o:p></p>
                  <blockquote
                    style="margin-top:5.0pt;margin-bottom:5.0pt">
                    <p class="MsoNormal">Hi All, Please review this code
                      changes for the below enhancement.<o:p></o:p></p>
                    <p class="MsoNormal"> <o:p></o:p></p>
                    <p class="MsoNormal">Enhancement: <a
                        href="https://bugs.openjdk.java.net/browse/JDK-8153732"
                        moz-do-not-send="true">https://bugs.openjdk.java.net/browse/JDK-8153732</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/8153732/webrev.00/"
                        moz-do-not-send="true">http://cr.openjdk.java.net/~sveerabhadra/8153732/webrev.00/</a><o:p></o:p></p>
                    <p class="MsoNormal"> <o:p></o:p></p>
                    <p class="MsoNormal">Details of the changes: Windows
                      provides *PrinterChangeNotification* functions
                      that provides information about printer status
                      changes of the local printers(subset) but not
                      network printers. <br>
                      Alternatively, Windows provides a way thro' which
                      one can get the network printer status changes by
                      using WMI, RegistryKeyChange combination, which is
                      a slightly complex mechanism. <br>
                      The Windows WMI offers an async and sync method to
                      read thro' registry via the WQL query. The async
                      method is considered dangerous as it leaves open a
                      channel until we close it. But the async method
                      has the advantage of being notified of a change in
                      registry by calling callback without polling for
                      it. The sync method uses the polling mechanism to
                      notify. <br>
                      RegistryValueChange cannot be used in combination
                      with WMI to get registry value change notification
                      because of an error that may be generated because
                      the scope of the query would be too big to
                      handle(at times). <br>
                      Hence an alternative mechanism is choosen via the
                      EnumPrinters by polling for the count of printer
                      status changes(add\remove) and based on it update
                      the printers list(both local and remote printers -
                      superset).<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>
                </blockquote>
                <p class="MsoNormal"><span
                    style="font-size:12.0pt;font-family:"Times New
                    Roman",serif"> </span><o:p></o:p></p>
              </blockquote>
              <p class="MsoNormal"><span
                  style="font-size:12.0pt;font-family:"Times New
                  Roman ,serif",serif"> </span><o:p></o:p></p>
            </blockquote>
            <p class="MsoNormal"><span
                style="font-size:12.0pt;font-family:"Times New
                Roman",serif"> </span><o:p></o:p></p>
          </blockquote>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;font-family:"Times New Roman
              ,serif",serif"> </span><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>
      </div>
    </blockquote>
    <br>
  </body>
</html>