On Thu, 11 May 2023 14:36:04 GMT, lawrence.andrews <d...@openjdk.org> wrote:

>> Write a test Check, when the top level Window is not the focused Window 
>> requesting for focus and becoming the Focus Owner for any Component in that 
>> Window checking the following
>> 
>> 1.The Component is the Focus Owner and the Window becomes the focused Window 
>> If the platform supports cross requesting focus
>> across Windows.
>> 2.The request is remembered and  be granted when the Window is later focused 
>> If the platform does not support requesting focus
>> across Windows.
>> 
>> Testing:
>> Tested using Mach5(20 times per platform) in macos,linux and windows and got 
>> all pass.
>
> test/jdk/java/awt/Focus/CrossFocusRequestTest/CrossFocusRequestTest.java line 
> 52:
> 
>> 50:     private volatile static Button button;
>> 51:     private volatile static TextField textField;
>> 52:     private volatile static int waitTimeout = 1000;
> 
> Add final keyword since value does not change

Agreed. This should be a final constant. And if you make it a constant, I don't 
think the volatile is necessary.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13790#discussion_r1191765282

Reply via email to