RFR: 8324807 : Manual printer tests have no Pass/Fail buttons, instructions close set 2 [v2]

Alexey Ivanov aivanov at openjdk.org
Wed Feb 7 20:32:03 UTC 2024


On Thu, 1 Feb 2024 00:38:37 GMT, Alisen Chung <achung at openjdk.org> wrote:

>> Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Capitalized static final variables
>
> test/jdk/java/awt/print/PrinterJob/InvalidPage.java line 106:
> 
>> 104:                 (int) pageFormat.getImageableWidth(),
>> 105:                 (int) pageFormat.getImageableHeight());
>> 106:         g2d.drawLine((int) pageFormat.getImageableWidth(), 0,
> 
> dispose g2D object

Please, don't dispose of `Graphics` in `print` and `paint` methods where it's passed as a parameter.

> test/jdk/java/awt/print/PrinterJob/JobName/PrinterJobName.java line 62:
> 
>> 60:                 .build();
>> 61: 
>> 62:         PrinterJob job = PrinterJob.getPrinterJob();
> 
> this can be moved into helper function

Not really… unless you create secondary UI to initiate printing.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17608#discussion_r1482031608
PR Review Comment: https://git.openjdk.org/jdk/pull/17608#discussion_r1482043566


More information about the client-libs-dev mailing list