<AWT Dev> RFR: 8272342: [TEST_BUG] java/awt/print/PrinterJob/PageDialogMarginTest.java catches all exceptions [v2]

Alexey Ivanov aivanov at openjdk.java.net
Sun Aug 15 10:30:29 UTC 2021


On Sat, 14 Aug 2021 01:15:45 GMT, rajat mahajan <github.com+79671271+rajamah at 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.
>
> rajat mahajan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix IDE warnings, added Default Locale as US, fixed Copyright to include current year.

Changes requested by aivanov (Reviewer).

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

> 1: /*
> 2:  * Copyright (c) 2016, 2021,  Oracle and/or its affiliates. All rights reserved.

Suggestion:

 * Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.

Two many spaces, there should be one space after the comma.

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

> 38: import javax.swing.JOptionPane;
> 39: import javax.swing.SwingUtilities;
> 40: import java.text.MessageFormat;

I wonder where do DialogTypeSelection and MessageFormat come from?

The imports should be sorted by default, usually your IDE handles it perfectly on its own.

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

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


More information about the awt-dev mailing list