RFR: 8357305: Compilation failure in javax/swing/JMenuItem/bug6197830.java [v4]
Alexey Ivanov
aivanov at openjdk.org
Wed May 21 16:18:53 UTC 2025
On Wed, 21 May 2025 03:00:15 GMT, Manukumar V S <mvs at openjdk.org> wrote:
>> There are some compilation failures noticed in the recently open sourced test javax/swing/JMenuItem/bug6197830.java. The compilation failures are due to missing import statements and a missing dependency file MenuItemTest.java.
>>
>> Fix: I have added the required import statements and added the code-piece from MenuItemTest.java as a method getMenuItemTestFrame().
>
> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision:
>
> Review comments fixed : Formatting changes,cosmetic changes,PassFailJFrame changes, etc
Changes requested by aivanov (Reviewer).
test/jdk/javax/swing/JMenuItem/MenuItemTest/bug4729669.java line 34:
> 32:
> 33: import javax.swing.JFrame;
> 34: import java.util.List;
Suggestion:
import java.util.List;
import javax.swing.JFrame;
Be consistent at least in a single changeset.
Although it wasn't agreed upon, the most common style is `java.*` packages go first followed by `javax.*` packages.
test/jdk/javax/swing/JMenuItem/MenuItemTest/bug4729669.java line 60:
> 58: JFrame f2 = MenuItemTestHelper.getMenuItemTestFrame(false);
> 59: f2.setLocation(500, 300);
> 60: return List.of(f1, f2);
Suggestion:
JFrame f1 = MenuItemTestHelper.getMenuItemTestFrame(true);
JFrame f2 = MenuItemTestHelper.getMenuItemTestFrame(false);
return List.of(f1, f2);
Remove `setLocation`, the `PassFailJFrame` framework fully handles the positioning of the windows.
-------------
PR Review: https://git.openjdk.org/jdk/pull/25319#pullrequestreview-2858062350
PR Review Comment: https://git.openjdk.org/jdk/pull/25319#discussion_r2100519744
PR Review Comment: https://git.openjdk.org/jdk/pull/25319#discussion_r2100515611
More information about the client-libs-dev
mailing list