RFR: 8325762: Use PassFailJFrame.Builder.splitUI() in PrintLatinCJKTest.java [v2]

Alexey Ivanov aivanov at openjdk.org
Thu Feb 15 12:36:03 UTC 2024


On Wed, 14 Feb 2024 22:13:18 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:

> I have a printer configured but I'm running into `PrinterException: Access is denied.` The option of saving to pdf doesn't work too.

Do other printer tests work? It seems more like a system configuration issue rather than JDK issue.

> test/jdk/java/awt/print/PrinterJob/PrintLatinCJKTest.java line 80:
> 
>> 78:                                               JOptionPane.ERROR_MESSAGE);
>> 79:                 PassFailJFrame.forceFail(msg);
>> 80:             }
> 
>> Displayed an error message to the tester if PrinterException is caught and automatically failed the test.
> 
> With the earlier test this failure was hidden until test timeouts and easy to miss, this code to handle PrinterException and forceFail the test immediately is a good addition.

This is why I insist on handling `PrinterException` or another possible exceptions in #17607, #17608, #17609 rather than swallowing them.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17847#issuecomment-1946008842
PR Review Comment: https://git.openjdk.org/jdk/pull/17847#discussion_r1490939781


More information about the client-libs-dev mailing list