RFR: 8276849: Refresh the window icon on graphics configuration changes [v3]
Alexey Ivanov
aivanov at openjdk.java.net
Wed Feb 23 17:09:56 UTC 2022
On Tue, 22 Feb 2022 22:42:31 GMT, Emmanuel Bourg <duke at openjdk.java.net> wrote:
>> test/jdk/java/awt/Window/WindowIconUpdateOnDPIChanging/WindowIconUpdateOnDPIChangingTest.java line 79:
>>
>>> 77: SwingUtilities.invokeLater(WindowIconUpdateOnDPIChangingTest::createUI);
>>> 78: if (!countDownLatch.await(15, TimeUnit.MINUTES)) {
>>> 79: frame.dispose();
>>
>> It must be called on EDT.
>> Suggestion:
>>
>> SwingUtilities.invokeAndWait(() -> frame.dispose());
>
> That's just a test, do we really need this level of refinement?
Yes, we do. Swing components must be accessed on EDT only, so OpenJDK tests should follow this rule. Someone could use a test as an example for _the correct way_.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6180
More information about the client-libs-dev
mailing list