RFR: 8341162: Open source some of the AWT window test [v3]
Jayathirth D V
jdv at openjdk.org
Fri Oct 4 17:16:27 UTC 2024
On Fri, 4 Oct 2024 13:41:19 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update based on review comments
>
> test/jdk/java/awt/Window/LocationByPlatform/TestLocationByPlatform.java line 86:
>
>> 84: }
>> 85:
>> 86: class MyCanvas extends Canvas {
>
> Please make a nested static class inside `TestLocationByPlatform`.
>
> It avoids any potential conflicts for any other tests which may use `MyCanvas` that you may have in classpath in your IDE.
I understand, updated the code.
> test/jdk/java/awt/Window/ShowWindowTest/ShowWindowTest.java line 43:
>
>> 41: public class ShowWindowTest implements ActionListener
>> 42: {
>> 43: private static Window win;
>
> I'd rather rename `win` to `window` — it makes it clearer. With code completion in IDE, you don't need to type the entire name; and renaming is just a shortcut or a few clicks away.
Updated.
> test/jdk/java/awt/Window/ShowWindowTest/ShowWindowTest.java line 52:
>
>> 50: 2. Click on the "Show" button. A window with a "Hello World" Label
>> 51: should appear
>> 52: 3. If the window does not appear the test failed, otherwise passed.
>
> Suggestion:
>
> 3. If the window does not appear, the test failed, otherwise passed.
Updated.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21284#discussion_r1788029056
PR Review Comment: https://git.openjdk.org/jdk/pull/21284#discussion_r1788029596
PR Review Comment: https://git.openjdk.org/jdk/pull/21284#discussion_r1788029388
More information about the client-libs-dev
mailing list