RFR: 8354451: Open source some more Swing popup menu tests [v2]
Phil Race
prr at openjdk.org
Tue Apr 15 22:45:05 UTC 2025
On Tue, 15 Apr 2025 00:23:52 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:
>> Phil Race has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8354451
>
> test/jdk/javax/swing/JPopupMenu/bug4212464.java line 54:
>
>> 52:
>> 53: static String strMetal = "Metal";
>> 54: static String metalClassName = "javax.swing.plaf.metal.MetalLookAndFeel";
>
> Extra space can be removed.
Ok ...
> test/jdk/javax/swing/JPopupMenu/bug4234793.java line 64:
>
>> 62: * 2. The mouse is clicked on another component.
>> 63: *
>> 64: * @test
>
> `@test` not required here
ok
> test/jdk/javax/swing/JPopupMenu/bug4234793.java line 178:
>
>> 176: comboPanel.add(combo);
>> 177:
>> 178: //JLabel message = new JLabel("Message area");
>
> Commented stmts can be removed.
yes
> test/jdk/javax/swing/JPopupMenu/bug4234793.java line 194:
>
>> 192:
>> 193: //message.setText(msg);
>> 194: //message.repaint();
>
> This method looks redundant and can be removed, PFJ.log() can be used directly instead.
I agree.
> test/jdk/javax/swing/JPopupMenu/bug4234793.java line 243:
>
>> 241: public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
>> 242: Object source = e.getSource();
>> 243: setMessage("popupmenu visible: " + source.getClass().getName());
>
> Here and at other locations
> Suggestion:
>
> PassFailJFrame.log("popupmenu visible: " + source.getClass().getName());
done
> test/jdk/javax/swing/JPopupMenu/bug4234793.java line 248:
>
>> 246: public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
>> 247: Object source = e.getSource();
>> 248: System.out.println("popupMenuWillBecomeInvisible: " + source.getClass().getName());
>
> Suggestion:
>
> PassFailJFrame.log("popupMenuWillBecomeInvisible: " + source.getClass().getName());
fixed
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045632471
PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045634024
PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045636984
PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045637457
PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045638576
PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045638432
More information about the client-libs-dev
mailing list