JDK-8334016 : Make PrintNullString.java automatic
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8,11,23,24
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-06-11
  • Updated: 2025-06-13
  • Resolved: 2025-05-23
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 17 JDK 21 JDK 25
11.0.29-oracleFixed 17.0.17-oracleFixed 21.0.9-oracleFixed 25 b25Fixed
Related Reports
Relates :  
Relates :  
Description
The java/awt/print/PrinterJob/PrintNullString.java tests Graphics2D.drawString API and it displays the result of test on the screen and on printer.

As it was noted during code review [1][2] for JDK-8333360, the test can be automated to some extent.

The PrintNullString.java can't be automated completely: the tester has to click Print / OK button in the Print dialog.

Other aspects of the test can be automated. The test code already detects a failure and reports it on the screen or on paper, thus the test can fail automatically if a failure condition is found.

However, the first part where it paints on the screen can be fully automated. It could be moved to an independent test.

These improvements to the test can be combined with fixing JDK-8333026, or the test can be updated separately.


When adding automatic features, pay attention to the tester too, let them know the test is going to fail automatically because a failure is detected.


[1] https://github.com/openjdk/jdk/pull/19540#pullrequestreview-2108672182
[2] https://github.com/openjdk/jdk/pull/19540#issuecomment-2159232777
Comments
Changeset: f5e6d2c9 Branch: master Author: Renjith Kannath Pariyangad <rkannathpari@openjdk.org> Committer: SendaoYan <syan@openjdk.org> Date: 2025-05-23 11:57:35 +0000 URL: https://git.openjdk.org/jdk/commit/f5e6d2c93c3274e465c42709b7634463899fdf2e
23-05-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/24501 Date: 2025-04-08 08:58:45 +0000
08-04-2025