[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] <Swing Dev> [11] JDK-8153732: Windows remote printer changes do not reflect in 
From:       Prasanta Sadhukhan <prasanta.sadhukhan () oracle ! com>
Date:       2018-06-25 5:34:20
Message-ID: e1ccd395-f288-8ab6-dbf5-3a6ac1f7aa82 () oracle ! com
[Download RAW message or body]

looks good.

Regards
Prasanta
On 6/25/2018 10:48 AM, Shashidhara Veerabhadraiah wrote:
> 
> My bad Prashanta. Here is the updated Webrev:
> 
> http://cr.openjdk.java.net/~sveerabhadra/8153732/webrev.07/ 
> <http://cr.openjdk.java.net/%7Esveerabhadra/8153732/webrev.07/>
> 
> Thanks and regards,
> Shashi
> 
> *From:*Prasanta Sadhukhan
> *Sent:* Friday, June 22, 2018 2:46 PM
> *To:* Shashidhara Veerabhadraiah 
> <shashidhara.veerabhadraiah@oracle.com>; Philip Race 
> <philip.race@oracle.com>; 2d-dev <2d-dev@openjdk.java.net>
> *Subject:* Re: [OpenJDK 2D-Dev] <Swing Dev> [11] JDK-8153732: Windows 
> remote printer changes do not reflect in lookupPrintServices()
> 
> you are using in java
> 
> 409             prevRemotePrinters = GetRemotePrintersNames();
> 431                 String[] currentRemotePrinters = 
> GetRemotePrintersNames();
> 
> 
> while you are at it, please change
> 
> 269                 if (info4->Attributes & 0x00000010) {
> to
> if (info4->Attributes & PRINTER_ATTRIBUTE_NETWORK) {
> as the hardcoded value might change in future.
> Regards
> Prasanta
> 
> On 6/22/2018 2:32 PM, Shashidhara Veerabhadraiah wrote:
> 
> Hi Prasanta, Here is the new webrev for that change:
> 
> http://cr.openjdk.java.net/~sveerabhadra/8153732/webrev.06/
> <http://cr.openjdk.java.net/%7Esveerabhadra/8153732/webrev.06/>
> 
> Thanks and regards,
> 
> Shashi
> 
> *From:*Prasanta Sadhukhan
> *Sent:* Friday, June 22, 2018 2:00 PM
> *To:* Shashidhara Veerabhadraiah
> <shashidhara.veerabhadraiah@oracle.com>
> <mailto:shashidhara.veerabhadraiah@oracle.com>; Philip Race
> <philip.race@oracle.com> <mailto:philip.race@oracle.com>; 2d-dev
> <2d-dev@openjdk.java.net> <mailto:2d-dev@openjdk.java.net>
> *Subject:* Re: [OpenJDK 2D-Dev] <Swing Dev> [11] JDK-8153732:
> Windows remote printer changes do not reflect in lookupPrintServices()
> 
> btw,
> 
> GetRemotePrintersNames
> 
> violates camelcase style. I suggest to use getRemotePrintersNames
> 
> 
> Regards
> Prasanta
> 
> On 6/22/2018 1:56 PM, Shashidhara Veerabhadraiah wrote:
> 
> Thank you Prasanta for the review.
> 
> Thanks and regards,
> 
> Shashi
> 
> *From:*Prasanta Sadhukhan
> *Sent:* Friday, June 22, 2018 1:42 PM
> *To:* Shashidhara Veerabhadraiah
> <shashidhara.veerabhadraiah@oracle.com>
> <mailto:shashidhara.veerabhadraiah@oracle.com>; Philip Race
> <philip.race@oracle.com> <mailto:philip.race@oracle.com>;
> 2d-dev <2d-dev@openjdk.java.net> <mailto:2d-dev@openjdk.java.net>
> *Subject:* Re: [OpenJDK 2D-Dev] <Swing Dev> [11] JDK-8153732:
> Windows remote printer changes do not reflect in
> lookupPrintServices()
> 
> looks good. One more thing, you could probably use
> 
> if (info4->Attributes & PRINTER_ATTRIBUTE_NETWORK) {
> 
> instead of hardcoding
> 
> if (info4->Attributes & 0x00000010) {
> 
> 
> Also,
> 
> getAllPrinterNames() shares more than 80% code with your recently \
> addedGetRemotePrintersNames(). Probably we could optimise getAllPrinterNames to use \
> yours 
> by having a parameter(all/remote) but it's upto you.
> 
> Regards
> 
> Prasanta
> 
> On 6/22/2018 12:53 PM, Shashidhara Veerabhadraiah wrote:
> 
> Hi Prasanta, Thank you for the review. Here is the new Webrev:
> 
> http://cr.openjdk.java.net/~sveerabhadra/8153732/webrev.05/
> <http://cr.openjdk.java.net/%7Esveerabhadra/8153732/webrev.05/>
> 
> For the EnumPrinters case, I think the cReturned is
> sufficient as it is set to zero every time we start.
> 
> Thanks and regards,
> 
> Shashi
> 
> *From:*Prasanta Sadhukhan
> *Sent:* Friday, June 22, 2018 10:41 AM
> *To:* Shashidhara Veerabhadraiah
> <shashidhara.veerabhadraiah@oracle.com>
> <mailto:shashidhara.veerabhadraiah@oracle.com>; Philip
> Race <philip.race@oracle.com>
> <mailto:philip.race@oracle.com>; 2d-dev
> <2d-dev@openjdk.java.net> <mailto:2d-dev@openjdk.java.net>
> *Subject:* Re: [OpenJDK 2D-Dev] <Swing Dev> [11]
> JDK-8153732: Windows remote printer changes do not reflect
> in lookupPrintServices()
> 
> I guess
> 
> if (pollStr.equalsIgnoreCase("true")) {
> 
> 70                 pollServices = true;
> 
> 71             } else if
> (pollStr.equalsIgnoreCase("false")) {
> 
> 72                 pollServices = false;
> 
> 73             }
> 
> can be written as
> 
> 
> 
> if (pollStr.equalsIgnoreCase("false"))
> 
> pollServices = false;
> 
> as it is already defaulted to true.
> 
> 78          * for polling PrintServices.  The default is 120.
> 
> I guess default is 240.
> 
> also, EnumPrinters returns bool, which we should check like
> 
> 263         if (cReturned > 0 && enumprintersret !=0 ) {
> 
> Regards
> 
> Prasanta
> 
> On 6/22/2018 10:03 AM, Shashidhara Veerabhadraiah wrote:
> 
> Hi Phil, Thanks for your review.
> 
> I have made your suggested changes and here is the
> updated webrev:
> 
> http://cr.openjdk.java.net/~sveerabhadra/8153732/webrev.04/
> <http://cr.openjdk.java.net/%7Esveerabhadra/8153732/webrev.04/>
> 
> Need one more review to commit this.
> 
> 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’.
> 
> Thanks and regards,
> 
> Shashi
> 
> *From:*Phil Race
> *Sent:* Friday, June 22, 2018 2:16 AM
> *To:* Shashidhara Veerabhadraiah
> <shashidhara.veerabhadraiah@oracle.com>
> <mailto:shashidhara.veerabhadraiah@oracle.com>; 2d-dev
> <2d-dev@openjdk.java.net> <mailto:2d-dev@openjdk.java.net>
> *Subject:* Re: <Swing Dev> [11] JDK-8153732: Windows
> remote printer changes do not reflect in
> lookupPrintServices()
> 
> I thought you were going to make the refresh time 4
> minutes ?
> I don't see that it has to be the same on Windows as
> it was on Unix,
> if you say 4 minutes is a sensible value there .. and
> 4 mins will be
> less CPU wake up, so I'd back that (4 mins) ahead of 2
> minutes as the default here.
> 
> You still have missing white space
> 
> 432             while(true) {
> 
> 
> With these two changes you have my +1 ..
> 
> BTW the native diff looks MUCH better now - thanks !
> 
> -phil.
> 
> On 06/21/2018 01:33 PM, Shashidhara Veerabhadraiah wrote:
> 
> Hi Phil, Here is the new Webrev for changes you
> suggested.
> 
> http://cr.openjdk.java.net/~sveerabhadra/8153732/webrev.03/
> <http://cr.openjdk.java.net/%7Esveerabhadra/8153732/webrev.03/>
> 
> Thanks and regards,
> 
> Shashi
> 
> *From:*Phil Race
> *Sent:* Friday, June 22, 2018 1:02 AM
> *To:* Shashidhara Veerabhadraiah
> <shashidhara.veerabhadraiah@oracle.com>
> <mailto:shashidhara.veerabhadraiah@oracle.com>;
> 2d-dev <2d-dev@openjdk.java.net>
> <mailto:2d-dev@openjdk.java.net>
> *Subject:* Re: <Swing Dev> [11] JDK-8153732:
> Windows remote printer changes do not reflect in
> lookupPrintServices()
> 
> 
> 
> +        private static final long DELAY = 1000 *
> 60 * 4; // 4 min pooling
> 
> I think we need a System Property that can control
> this.
> 
> I suggest the name
> "sun.java2d.print.minRefreshTime" which is what we
> use on Unix.
> 
> and similarly to there we should have
> "sun.java2d.print.polling" which is a boolean
> 
> and controls whether we do this at all ..
> 
> See
> src/java.desktop/unix/classes/sun/print/PrintServiceLookupProvider.java
> 
> Lots of places where you are missing a space
> before "("
> 
> +            if(str1.length != str2.length) {
> 
> +                for(int i = 0;i < str1.length;i++) {
> 
> +                    for(int j = 0;j <
> str2.length;j++) {
> 
> +                       
> if(!str1[i].equals(str2[j])) {
> 
> 
> 
> +            while(true) {
> 
> +                if(doCompare(prevRemotePrinters,
> currentRemotePrinters)) {
> 
> There's some of that in native too
> 
> 266                 if(info4->Attributes &
> 0x00000010) {
> 
> In
> http://cr.openjdk.java.net/~sveerabhadra/8153732/webrev.01/src/java.desktop/windows/native/libawt/windows/WPrinterJob.cpp.sdiff.html
>  <http://cr.openjdk.java.net/%7Esveerabhadra/8153732/webrev.01/src/java.desktop/windows/native/libawt/windows/WPrinterJob.cpp.sdiff.html>
>  
> you seem to have moved all the existing and (I
> think) unchanged related functions so the DIFF appears
> 
> much bigger than it really is. Please move them
> back and re-generate.
> 
> The test really needs to provide an "out" for
> someone running the test who has no way
> 
> to add a network printer .. they don't want to
> have to fail the test.
> 
> As well as that, arguably this should be an
> @ignore test, so it is not run unless
> 
> you are trying to run all the tests.
> 
> -phil.
> 
> On 06/21/2018 12:08 PM, Shashidhara Veerabhadraiah
> wrote:
> 
> 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.
> 
> The windows **PrinterChangeNotifications**
> 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.
> 
> http://cr.openjdk.java.net/~sveerabhadra/8153732/webrev.01/
> <http://cr.openjdk.java.net/%7Esveerabhadra/8153732/webrev.01/>
> 
> Thanks and regards,
> 
> Shashi
> 
> *From:*Philip Race
> *Sent:* Thursday, June 21, 2018 5:38 AM
> *To:* 2d-dev <2d-dev@openjdk.java.net>
> <mailto:2d-dev@openjdk.java.net>; Shashidhara
> Veerabhadraiah
> <shashidhara.veerabhadraiah@oracle.com>
> <mailto:shashidhara.veerabhadraiah@oracle.com>
> *Subject:* Fwd: Re: <Swing Dev> [11]
> JDK-8153732: Windows remote printer changes do
> not reflect in lookupPrintServices()
> 
> The main concern I have is we now have a busy
> thread burning CPU ..
> bad for laptops .. and if we add a delay we
> have less prompt notification
> of a new local printer.
> 
> I think the compromise is that the existing
> thread maybe kept as is,
> and we add a new thread that pools every 10
> minutes for a remote printer.
> 
> If we can make the existing thread wake up
> from its wait and do that, even better.
> 
> -phil.
> 
> -------- Original Message --------
> 
> *Subject: *
> 
> 	
> 
> Re: [11] JDK-8153732: Windows remote printer
> changes do not reflect in lookupPrintServices()
> 
> *Date: *
> 
> 	
> 
> Wed, 20 Jun 2018 17:03:56 -0700
> 
> *From: *
> 
> 	
> 
> Philip Race <philip.race@oracle.com>
> <mailto:philip.race@oracle.com>
> 
> *Organization: *
> 
> 	
> 
> Oracle Corporation
> 
> *To: *
> 
> 	
> 
> Shashidhara Veerabhadraiah
> <shashidhara.veerabhadraiah@oracle.com>
> <mailto:shashidhara.veerabhadraiah@oracle.com>
> 
> *CC: *
> 
> 	
> 
> awt-dev@openjdk.java.net
> <mailto:awt-dev@openjdk.java.net>,
> swing-dev@openjdk.java.net
> <mailto:swing-dev@openjdk.java.net>
> 
> 
> 
> This is on the wrong lists. Not Swing. Not
> AWT. Should be 2d.
> I'll forward it there and continue there.
> Consider the AWT+Swing threads dead.
> 
> -phil.
> 
> On 6/20/18, 3:12 AM, Shashidhara
> Veerabhadraiah wrote:
> 
> Hi All, Please review this code changes
> for the below enhancement.
> 
> Enhancement:
> https://bugs.openjdk.java.net/browse/JDK-8153732
> 
> Webrev:
> http://cr.openjdk.java.net/~sveerabhadra/8153732/webrev.00/
> <http://cr.openjdk.java.net/%7Esveerabhadra/8153732/webrev.00/>
> 
> Details of the changes: Windows provides
> *PrinterChangeNotification* functions that
> provides information about printer status
> changes of the local printers(subset) but
> not network printers.
> 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.
> 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.
> 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).
> 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).
> 
> Thanks and regards,
> 
> Shashi
> 


[Attachment #3 (text/html)]

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>looks good.<br>
    </p>
    Regards<br>
    Prasanta<br>
    <div class="moz-cite-prefix">On 6/25/2018 10:48 AM, Shashidhara
      Veerabhadraiah wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:84fa4726-fc7f-449d-b22c-f613ed109954@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";}
/* 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;
	font-family:"Calibri",sans-serif;
	color:#1F497D;}
span.EmailStyle28
	{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">My bad
            Prashanta. Here is the updated Webrev:<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"><a
              href="http://cr.openjdk.java.net/%7Esveerabhadra/8153732/webrev.07/"
              moz-do-not-send="true">http://cr.openjdk.java.net/~sveerabhadra/8153732/webrev.07/</a><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,<br>
            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> Friday, June 22, 2018 2:46 PM<br>
                <b>To:</b> Shashidhara Veerabhadraiah
                <a class="moz-txt-link-rfc2396E" \
href="mailto:shashidhara.veerabhadraiah@oracle.com">&lt;shashidhara.veerabhadraiah@oracle.com&gt;</a>; \
                Philip
                Race <a class="moz-txt-link-rfc2396E" \
                href="mailto:philip.race@oracle.com">&lt;philip.race@oracle.com&gt;</a>; \
                2d-dev
                <a class="moz-txt-link-rfc2396E" \
href="mailto:2d-dev@openjdk.java.net">&lt;2d-dev@openjdk.java.net&gt;</a><br>  \
<b>Subject:</b> Re: [OpenJDK 2D-Dev] &lt;Swing Dev&gt;  [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>you are using in java<span style="font-size:12.0pt"><o:p></o:p></span></p>
        <pre><span class="new">409             prevRemotePrinters = \
                GetRemotePrintersNames();<o:p></o:p></span></pre>
        <pre><span class="new">431                 String[] currentRemotePrinters = \
GetRemotePrintersNames();</span><o:p></o:p></pre>  <p class="MsoNormal"><br>
          while you are at it, please change <o:p></o:p></p>
        <pre><span class="new">269                 if (info4-&gt;Attributes &amp; \
0x00000010) {<o:p></o:p></span></pre>  <pre><span \
                class="new">to<o:p></o:p></span></pre>
        <pre><span class="new">if (info4-&gt;Attributes &amp; \
PRINTER_ATTRIBUTE_NETWORK) {<o:p></o:p></span></pre>  <pre><span class="new"><o:p> \
                </o:p></span></pre>
        <pre><span class="new"> as the hardcoded value might change in \
future.<o:p></o:p></span></pre>  <pre><span class="new"><o:p> </o:p></span></pre>
        <pre><span class="new">Regards<o:p></o:p></span></pre>
        <pre><span class="new">Prasanta<o:p></o:p></span></pre>
        <div>
          <p class="MsoNormal">On 6/22/2018 2:32 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,
              Here is the new webrev for that change:</span><o:p></o:p></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></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 2:00 PM<br>
                  <b>To:</b> Shashidhara Veerabhadraiah <a
                    href="mailto:shashidhara.veerabhadraiah@oracle.com"
                    moz-do-not-send="true">&lt;shashidhara.veerabhadraiah@oracle.com&gt;</a>;
  Philip Race <a href="mailto:philip.race@oracle.com"
                    moz-do-not-send="true">&lt;philip.race@oracle.com&gt;</a>;
                  2d-dev <a href="mailto:2d-dev@openjdk.java.net"
                    moz-do-not-send="true">&lt;2d-dev@openjdk.java.net&gt;</a><br>
                  <b>Subject:</b> Re: [OpenJDK 2D-Dev] &lt;Swing Dev&gt;
                  [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>btw, <o:p></o:p></p>
          <pre><span class="new">GetRemotePrintersNames </span><o:p></o:p></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">&lt;shashidhara.veerabhadraiah@oracle.com&gt;</a>;  Philip \
                Race <a href="mailto:philip.race@oracle.com"
                      moz-do-not-send="true">&lt;philip.race@oracle.com&gt;</a>;
                    2d-dev <a href="mailto:2d-dev@openjdk.java.net"
                      moz-do-not-send="true">&lt;2d-dev@openjdk.java.net&gt;</a><br>
                    <b>Subject:</b> Re: [OpenJDK 2D-Dev] &lt;Swing
                    Dev&gt; [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-&gt;Attributes &amp; \
PRINTER_ATTRIBUTE_NETWORK) {</span><o:p></o:p></pre>  <p>instead of \
                hardcoding<o:p></o:p></p>
            <pre><span class="new">if (info4-&gt;Attributes &amp; 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">&lt;shashidhara.veerabhadraiah@oracle.com&gt;</a>;  Philip \
Race <a  href="mailto:philip.race@oracle.com"
                        moz-do-not-send="true">&lt;philip.race@oracle.com&gt;</a>;
                      2d-dev <a href="mailto:2d-dev@openjdk.java.net"
                        \
moz-do-not-send="true">&lt;2d-dev@openjdk.java.net&gt;</a><br>  <b>Subject:</b> Re: \
[OpenJDK 2D-Dev] &lt;Swing  Dev&gt; [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 &gt; 0 &amp;&amp; \
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">&lt;shashidhara.veerabhadraiah@oracle.com&gt;</a>;  2d-dev <a \
                href="mailto:2d-dev@openjdk.java.net"
                          \
moz-do-not-send="true">&lt;2d-dev@openjdk.java.net&gt;</a><br>  <b>Subject:</b> Re: \
&lt;Swing Dev&gt; [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">&lt;shashidhara.veerabhadraiah@oracle.com&gt;</a>;  2d-dev <a
                            href="mailto:2d-dev@openjdk.java.net"
                            \
moz-do-not-send="true">&lt;2d-dev@openjdk.java.net&gt;</a><br>  <b>Subject:</b> Re: \
&lt;Swing Dev&gt; [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 &lt; \
                str1.length;i++) {</span><o:p></o:p></pre>
                  <pre><span class="new">+                    for(int j = 0;j &lt; \
                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-&gt;Attributes \
&amp; 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">&lt;2d-dev@openjdk.java.net&gt;</a>;  Shashidhara \
                Veerabhadraiah <a
                              href="mailto:shashidhara.veerabhadraiah@oracle.com"
                              \
moz-do-not-send="true">&lt;shashidhara.veerabhadraiah@oracle.com&gt;</a><br>  \
<b>Subject:</b> Fwd: Re: &lt;Swing Dev&gt;  [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">&lt;philip.race@oracle.com&gt;</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">&lt;shashidhara.veerabhadraiah@oracle.com&gt;</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:&quot;Times
                      New Roman \,serif&quot;"> </span><o:p></o:p></p>
                </blockquote>
                <p class="MsoNormal"><span
                    style="font-size:12.0pt;font-family:&quot;Times New
                    Roman&quot;,serif"> </span><o:p></o:p></p>
              </blockquote>
              <p class="MsoNormal"><span
                  style="font-size:12.0pt;font-family:&quot;Times New
                  Roman \,serif&quot;"> </span><o:p></o:p></p>
            </blockquote>
            <p class="MsoNormal"><span
                style="font-size:12.0pt;font-family:&quot;Times New
                Roman&quot;,serif"> </span><o:p></o:p></p>
          </blockquote>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;font-family:&quot;Times New Roman
              \,serif&quot;"> </span><o:p></o:p></p>
        </blockquote>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:&quot;Times New
            Roman&quot;,serif"><o:p> </o:p></span></p>
      </div>
    </blockquote>
    <br>
  </body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic