RFR: 8339524: Clean up ExtendedRobot tests
Alexey Ivanov
aivanov at openjdk.org
Fri Sep 20 10:02:38 UTC 2024
On Wed, 4 Sep 2024 03:34:34 GMT, Alisen Chung <achung at openjdk.org> wrote:
> Cleaning up tests building ExtendedRobot that shouldn't be.
Changes requested by aivanov (Reviewer).
test/jdk/javax/swing/JInternalFrame/6725409/bug6725409.java line 1:
> 1: /*
`frame` should be disposed of on EDT.
`TestTitlePane` can be static.
test/jdk/javax/swing/JInternalFrame/6725409/bug6725409.java line 44:
> 42: private TestTitlePane testTitlePane;
> 43: private boolean passed;
> 44: private static Robot robot = createRobot();
Suggestion:
private static final Robot robot = createRobot();
test/jdk/javax/swing/JInternalFrame/6725409/bug6725409.java line 153:
> 151: Robot robot = new Robot();
> 152: return robot;
> 153: }catch(Exception ex) {
Suggestion:
} catch(Exception ex) {
And pass the caught exception as the `cause` parameter to `Error` — `ex.printStackTrace()` becomes redundant.
-------------
PR Review: https://git.openjdk.org/jdk/pull/20846#pullrequestreview-2317810835
PR Review Comment: https://git.openjdk.org/jdk/pull/20846#discussion_r1768331370
PR Review Comment: https://git.openjdk.org/jdk/pull/20846#discussion_r1768329617
PR Review Comment: https://git.openjdk.org/jdk/pull/20846#discussion_r1768328968
More information about the client-libs-dev
mailing list