RFR: 8321192 : j.a.PrintJob/ImageTest/ImageTest.java: Fail or skip the test if there's no printer

Alexey Ivanov aivanov at openjdk.org
Fri Feb 9 15:21:54 UTC 2024


On Fri, 9 Feb 2024 14:59:06 GMT, Renjith Kannath Pariyangad <rkannathpari at openjdk.org> wrote:

> Hi Reviewers,
> I have updated the test with 'PassFailJFrame' with programmatically generating image and print , please review and let me know your suggestions.

Should we mark `paint` and `imageUpdate` with `@Override` annotation?

Overall, looks good to me.

test/jdk/java/awt/PrintJob/ImageTest/ImageTest.java line 25:

> 23: 
> 24: import javax.imageio.ImageIO;
> 25: import java.awt.Button;

Usually, `javax.*` packages are below `java.*` packages.

test/jdk/java/awt/PrintJob/ImageTest/ImageTest.java line 78:

> 76:         }
> 77: 
> 78:         public void setPrintJob(PrintJob pj) {

Can be make `private`.

test/jdk/java/awt/PrintJob/ImageTest/ImageTest.java line 108:

> 106:         });
> 107:         f.add(b);
> 108:         f.setBounds(0, 50, 700, 350);

Suggestion:

        f.setSize(700, 350);

The position is determined by `PassFailJFrame`.

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

Marked as reviewed by aivanov (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/17790#pullrequestreview-1872626123
PR Review Comment: https://git.openjdk.org/jdk/pull/17790#discussion_r1484455968
PR Review Comment: https://git.openjdk.org/jdk/pull/17790#discussion_r1484458121
PR Review Comment: https://git.openjdk.org/jdk/pull/17790#discussion_r1484459755


More information about the client-libs-dev mailing list