RFR: 8288137: The set of available printers is not updated without application restart [v2]
Phil Race
prr at openjdk.org
Fri Jul 8 20:30:32 UTC 2022
On Fri, 8 Jul 2022 18:12:36 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> The last time we updated.
>> If the number of printers has changed I will always rebuild the printer list (set) but if they are the same
>> what are the odds a printer was removed and another one added ?
>> I figured if 2 minutes has passed since we last checked it is worth it, but I am not re-setting this every
>> time we called getAllPrinters() else if you kept calling it every 30 seconds .. then we'd never get past that check.
>
> In that case shouldn't the assignment of `lastTime` be moved up two lines, right below the call to `updatePrinters`? Or am I missing something?
I guess I knew what I wanted but didn't have the code to match :-)
-------------
PR: https://git.openjdk.org/jfx/pull/817
More information about the openjfx-dev
mailing list