RFR: 8244400: MenuItem may cache the size and did not update it when the screen DPI is changed [v2]

Prasanta Sadhukhan psadhukhan at openjdk.org
Wed Dec 7 10:13:17 UTC 2022


On Wed, 7 Dec 2022 09:45:09 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Review update
>
> test/jdk/javax/swing/GraphicsConfigNotifier/StalePreferredSize.java line 2:
> 
>> 1: /*
>> 2:  * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
> 
> The date in the `BasicMenuItemUI.java` can be updated as well.

ok

> test/jdk/javax/swing/GraphicsConfigNotifier/StalePreferredSize.java line 99:
> 
>> 97:                 System.out.println("Skipped Motif");
>> 98:                 continue;
>> 99:             }
> 
> You do not need to ignore it since it is still supported and seems to work.

Yes, I "do not need to" but I chose to as it is deprecated and marked for removal and in future, if it starts to fail, then it will be a maintenance headache so I chose to ignore from now itself. Also, it's a heavy duty test and takes time so unnecessary it will consume more time in CI systems (which are heavily loaded anyways) for a L&F which we dont care about much nowadays!

> test/jdk/javax/swing/GraphicsConfigNotifier/StalePreferredSize.java line 187:
> 
>> 185:                 if (component instanceof JMenuItem) {
>> 186:                     // TODO JDK-8244400
>> 187:                     MenuItemLayoutHelper.clearUsedParentClientProperties((JMenuItem)component);
> 
> This call was the only reason to have " * @modules java.desktop/sun.swing" at the header of the test.

ok..removed..

-------------

PR: https://git.openjdk.org/jdk/pull/11551



More information about the client-libs-dev mailing list