RFR: 8320608: Many jtreg printing tests are missing the @printer keyword [v2]

Phil Race prr at openjdk.org
Thu Nov 30 18:23:31 UTC 2023


On Thu, 30 Nov 2023 17:08:21 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Phil Race has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8320608
>
> test/jdk/java/awt/print/PrinterJob/EmptyFill.java line 72:
> 
>> 70:            return;
>> 71:        }
>> 72:        PrinterJob pj = PrinterJob.getPrinterJob();
> 
> It looks good, however, I'd move the blank so that the code groups logically:
> 
> 
>        StreamPrintService svc = spfs[0].getPrintService(baos);
>        if (svc == null) {
>            return;
>        }
> 
>        PrinterJob pj = PrinterJob.getPrinterJob();
> 
> 
> Perhaps, the test should fail if `svc` happens to be `null`, after all it's quite unexpected if it's `null`, isn't it?

yes, it should always be possible to create the Postscript Stream PrintService - added throw new RTE.

> test/jdk/java/awt/print/PrinterJob/RemoveListener.java line 28:
> 
>> 26:  * @bug 4459889
>> 27:  * @summary No NullPointerException should occur.
>> 28:  * @key printer
> 
> Suggestion:
> 
>  * @test
>  * @bug 4459889
>  * @key printer
>  * @summary No NullPointerException should occur.
> 
> To be consistent with other tests.

fixed

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16785#discussion_r1411097828
PR Review Comment: https://git.openjdk.org/jdk/pull/16785#discussion_r1411098415


More information about the client-libs-dev mailing list