JDK-8263311 : Watch registry changes for remote printers update instead of polling
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 7u241,8u231,11
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • Submitted: 2021-03-09
  • Updated: 2025-01-21
  • Resolved: 2021-03-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 16 JDK 17 JDK 7 JDK 8 Other
11.0.12-oracleFixed 16.0.2Fixed 17 b15Fixed 7u311Fixed 8u301Fixed openjdk8u312Fixed
Related Reports
Relates :  
Relates :  
Description
JDK-8153732 implemented polling for remote printers.
That bug description also mentions watching the registry for changes and links to the article which describes the method yet it does so in terms of WMI. Using WMI is not necessary to watch for the registry updates.

It is possible to replace polling mechanism with registry change notifications. If the registry at HKCU\Printers\Connections is updated, refresh the list of print services.
Comments
Fix Request(8u): Backport to 8u requested because it is a part of 8u301-oracle. Patch does not apply cleanly, review approval: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2021-June/013982.html
09-06-2021

Fix Request (11u) Should get backported for parity with 11.0.12-oracle. Applies cleanly.
20-04-2021

Fix Request (16u) - Justification: Improved handling of remote printers - Risk Analysis: Low, uses Windows registry notification functions instead of polling for changes - Testing: Manual test case, RemotePrinterStatusRefresh.java The patch from jdk-dev (17) applies cleanly to 16u.
22-03-2021

Changeset: a85dc557 Author: Alexey Ivanov <aivanov@openjdk.org> Date: 2021-03-18 13:26:22 +0000 URL: https://git.openjdk.java.net/jdk/commit/a85dc557
18-03-2021