RFR: 8348675: TrayIcon tests fail in Ubuntu 24.10 Wayland [v2]

Alexander Zvegintsev azvegint at openjdk.org
Tue Jan 28 18:40:01 UTC 2025


On Tue, 28 Jan 2025 17:44:19 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Alexander Zvegintsev has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - minor
>>  - review comments
>
> test/jdk/java/awt/TrayIcon/ActionCommand/ActionCommand.java line 68:
> 
>> 66: 
>> 67:     public static void main(String[] args) throws Exception {
>> 68:         if (Platform.isOnWayland()) {
> 
> Perhaps, each `if` statement could be standalone… without the `else`. For both conditions `Platform.isOnWayland()` and `!SystemTray.isSupported()`, an exception is thrown, which means the test effectively finished. The following statements would be executed if and only if, no exception was thrown, therefore the indentation of the code could be reduced and the code would also look cleaner.

Sure, this is better, updated.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23329#discussion_r1932680453


More information about the client-libs-dev mailing list