RFR: 8285687 : Remove jtreg tag manual=yesno for ava/awt/print/PrinterJob/PageRangesDlgTest.java [v5]

Alexey Ivanov aivanov at openjdk.java.net
Tue May 17 19:23:47 UTC 2022


On Fri, 29 Apr 2022 20:37:30 GMT, lawrence.andrews <duke at openjdk.java.net> wrote:

>> 1) Fixed Parser error by removing  yesno from @run main/manual=yesno 
>> 2) Used PassFaileJFrame to show the test instruction to the user instead of printing the test instruction on the console or jtreg log file. 
>> 3) If printer is not configured then mark the test as passed.
>> 
>> @shurymury 
>> @aivanov-jdk
>
> lawrence.andrews has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Added jtreg.SkippedException
>  - Added jtreg.SkippedException

Changes requested by aivanov (Reviewer).

test/jdk/java/awt/print/PrinterJob/PageRangesDlgTest.java line 67:

> 65: 
> 66:     public static void main(String[] args) throws Exception {
> 67:         if (PrinterJob.lookupPrintServices().length > 0) {

The inverted condition produces cleaner code with less indentation:


        if (PrinterJob.lookupPrintServices().length == 0) {
            throw new SkippedException("Printer not configured or available."
                                       + " Test cannot continue.");
        }

        // Rest of the test code

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

PR: https://git.openjdk.java.net/jdk/pull/8412



More information about the client-libs-dev mailing list