On Thu, 4 Sep 2025 11:30:13 GMT, Alexey Ivanov <aiva...@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