On Fri, 13 Aug 2021 19:23:21 GMT, rajat mahajan 
<github.com+79671271+raja...@openjdk.org> wrote:

> Removed try catch block so the test can function as expected and fail
> when it ought to, rather than passing all the time because of catch
> block catching all exceptions and Passing test even there is a failure.

Please add

    Locale.setDefault(Locale.US);

as the first line in `main()`, otherwise the Page Format dialog uses 
millimetres instead of inches for non-US locales.

Please resolve IDE warnings:
1. Use Java style array declaration in main: `String[] args`.
2. Line 51: Casting 'null' to 'Component' is redundant.
3. Line 50: Statement lambda can be replaced with expression lambda.

Please update the copyright year.

test/jdk/java/awt/print/PrinterJob/PageDialogMarginTest.java line 58:

> 56:         HashPrintRequestAttributeSet aset = new 
> HashPrintRequestAttributeSet();
> 57:         PageFormat pf;
> 58:         pf = pj.pageDialog(aset);

I suggest merging these two lines:
Suggestion:

        PageFormat pf = pj.pageDialog(aset);

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

Changes requested by aivanov (Reviewer).

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

Reply via email to