RFR: 8158801: [TEST_BUG] Mixing tests fail because of focus workaround trick [v30]
Khalid Boulanouare
duke at openjdk.org
Thu Sep 4 12:26:47 UTC 2025
On Thu, 4 Sep 2025 11:30:13 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> 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.
I suggest the following changes :
public GlassPaneOverlappingTestBase() {
this(true);
}
public GlassPaneOverlappingTestBase(boolean defaultClickValidation) {
super(defaultClickValidation);
multiFramesTest =false;
}
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25971#discussion_r2321919151
More information about the client-libs-dev
mailing list