On Thu, 4 Sep 2025 10:49:40 GMT, Alexey Ivanov <[email protected]> wrote:

>> Khalid Boulanouare has updated the pull request with a new target base due 
>> to a merge or a rebase. The incremental webrev excludes the unrelated 
>> changes brought in by the merge/rebase. The pull request contains 46 
>> additional commits since the last revision:
>> 
>>  - Merge branch 'openjdk:master' into jdk-8158801
>>  - Disposes frame at the end of testing.
>>  - Moves latch logic inside ancestor frame block
>>  - Merge branch 'openjdk:master' into jdk-8158801
>>  - Disposes frames after each AWT component test
>>  - Removes redundant code for centring frames
>>  - Merge branch 'openjdk:master' into jdk-8158801
>>  - Merge branch 'openjdk:master' into jdk-8158801
>>  - Centers missed frames in the middle of screen
>>  - Uses KeyboardFocusManager instead of FocusManager
>>  - ... and 36 more: https://git.openjdk.org/jdk/compare/3ec7180a...a62416a9
>
> test/jdk/java/awt/Mixing/AWT_Mixing/GlassPaneOverlappingTestBase.java line 63:
> 
>> 61:     {
>> 62:         multiFramesTest = false;
>> 63:     }
> 
> I prefer this is done in a constructor rather than a simple initialiser, it 
> just makes the intent clearer.
> 
> The same applies to setting the initial value of `multiFramesTest` in 
> `SimpleOverlappingTestBase`.
> 
> `SimpleOverlappingTestBase` has constructors, `GlassPaneOverlappingTestBase` 
> has constructors too. I believe `multiFramesTest` doesn't change, and if you 
> initialise it in a constructor, you can make it `final`, and I'm always for 
> using immutable fields.

The above approach may require additional refactoring, and I see that class 
initialisers are used to set values of flags.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25971#discussion_r2321744283

Reply via email to