On Tue, 22 Feb 2022 22:42:31 GMT, Emmanuel Bourg <d...@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

Reply via email to