RFR: 8316931: [macos14] Test "java/awt/TrayIcon/ShowAfterDisposeTest/ShowAfterDisposeTest.html" throws and exception on Mac OS 14(x64, aarch64) [v2]

Alexey Ivanov aivanov at openjdk.org
Fri Jan 12 21:36:24 UTC 2024


On Wed, 10 Jan 2024 21:08:35 GMT, Alisen Chung <achung at openjdk.org> wrote:

>> SunToolkit.java is trying to post an event on the TrayIcon appContext, but the TrayIcon was already removed by the test, causing an error. The fix is to make SunToolkit skip posting the event if appContext is null. The test is also updated to remove applet usage and use PassFailJFrame instead.
>
> Alisen Chung has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - spacing
>  - updated test title, copyright year, removed redundant check

Please update the copyright year in `SunToolkit.java` too.

I haven't looked through all the code in the test.

Note: I've edited the JBS subject to correct “and” to “an” and to remove double space.

test/jdk/java/awt/TrayIcon/ShowAfterDisposeTest/ShowAfterDisposeTest.java line 2:

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

Suggestion:

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

There must be another comma after the second copyright year.

test/jdk/java/awt/TrayIcon/ShowAfterDisposeTest/ShowAfterDisposeTest.java line 58:

> 56:             System.out.println("The test cannot be run because SystemTray is not supported.");
> 57:             return;
> 58:         }

I'd rather move this entire check into the `main` method and throw `jtreg.SkippedException` instead.

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

PR Review: https://git.openjdk.org/jdk/pull/17329#pullrequestreview-1819063454
PR Review Comment: https://git.openjdk.org/jdk/pull/17329#discussion_r1450937261
PR Review Comment: https://git.openjdk.org/jdk/pull/17329#discussion_r1450939638


More information about the client-libs-dev mailing list