RFR: 8328370: Convert java/awt/print/Dialog/PrintApplet.java applet test to main [v2]
Damon Nguyen
dnguyen at openjdk.org
Tue Mar 19 19:00:21 UTC 2024
On Tue, 19 Mar 2024 00:31:27 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:
>> Damon Nguyen has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Remove unused frame
>> - splitUI addition. Add forceFail
>
> test/jdk/java/awt/print/Dialog/PrintModalDialog.java line 70:
>
>> 68: .rows(10)
>> 69: .columns(40)
>> 70: .testUI(PrintModalDialog::createAndShowGUI)
>
> Since the testUI is a simple "Print" button PassFailJFrame's spiltUIBottom() can be used with just a JButton to simplify the UI.
Added, thanks
> test/jdk/java/awt/print/Dialog/PrintModalDialog.java line 127:
>
>> 125: }
>> 126: catch (java.awt.print.PrinterException ex) {
>> 127: ex.printStackTrace();
>
> It is better to use PassFailJFrame.forceFail() when a printer exception occurs else the timer keeps running and the error is swallowed even after a printer exception has occurred.
>
> Suggestion:
>
> catch (java.awt.print.PrinterException ex) {
> ex.printStackTrace();
> String msg = "PrinterException: " + ex.getMessage();
> PassFailJFrame.forceFail(msg);
Thanks for the suggestion. Added as suggested
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18362#discussion_r1530930647
PR Review Comment: https://git.openjdk.org/jdk/pull/18362#discussion_r1530931261
More information about the client-libs-dev
mailing list