On Wed, 10 Jan 2024 21:08:35 GMT, Alisen Chung <[email protected]> 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