RFR: 8373650: Test "javax/swing/JMenuItem/6458123/ManualBug6458123.java" fails because the check icons are not aligned properly as expected [v4]
Prasanta Sadhukhan
psadhukhan at openjdk.org
Mon Jan 19 08:59:01 UTC 2026
On Mon, 19 Jan 2026 08:52:33 GMT, Tejesh R <tr at openjdk.org> wrote:
>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> copyright year updated
>
> src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java line 938:
>
>> 936: (icon.getIconHeight() <= 16) ? y + OFFSET : (y + icon.getIconHeight() / 2), state);
>> 937: } else {
>> 938: skin.paintSkin(g,
>
> Can we optimize the code here, since mostly `x` is changing here based on conditions. It'll help in readability and review too.
No, y is also changing depending on icon height...
As of now, any more optimization is not possible, it can be done as followup if it is needed..
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28889#discussion_r2703826079
More information about the client-libs-dev
mailing list