RFR: 8306812: Open source several AWT Miscellaneous tests [v5]

Prasanta Sadhukhan psadhukhan at openjdk.org
Fri May 26 08:13:10 UTC 2023


On Fri, 26 May 2023 07:30:59 GMT, Tejesh R <tr at openjdk.org> wrote:

>> test/jdk/java/awt/PopupMenu/PopupMenuStayOpen.java line 103:
>> 
>>> 101:             robot.delay(500);
>>> 102: 
>>> 103:             EventQueue.invokeAndWait(() -> {
>> 
>> why is it under EDT? you can make the variable volatile and remove EDT
>
> I have updated the variable, but still it has to be under EDT right? Since it is shared.

No, you have made the variable  volatile which indicates it can be sharable across threads, also there is no widgets being accessed so no need of EDT

>> test/jdk/java/awt/Scrollbar/ScrollbarKeyControlTest.java line 62:
>> 
>>> 60:     }
>>> 61: 
>>> 62:     public void init() throws Exception {
>> 
>> you can move the contents into main
>
> Means, should I make everything static and then change the Listener's references?

ok. I guess this should be good enough as it has listener

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13828#discussion_r1206367141
PR Review Comment: https://git.openjdk.org/jdk/pull/13828#discussion_r1206390244



More information about the client-libs-dev mailing list