<Swing Dev> [13] RFR 8196096: javax/swing/JPopupMenu/6580930/bug6580930.java fails

semyon.sadetsky at oracle.com semyon.sadetsky at oracle.com
Thu May 23 15:58:58 UTC 2019


On 5/22/19 3:15 PM, Sergey Bylokhov wrote:

> On 22/05/2019 14:59, semyon.sadetsky at oracle.com wrote:
>> On 5/22/19 2:29 PM, Sergey Bylokhov wrote:
>>> Why it s necessary to change the adjustPopupLocationToFit value? why 
>>> on macOS it does not work by default like on others platforms?
>>> If I read an initial bug 6580930 correctly there was an intention 
>>> that HW popup should be able to overlap taskbar by default and I 
>>> assume it works this way on win/lin(or it does not work)? Any
>> It's hard to say now why this Swing property was introduced on Mac. 
>> But the current fix is intended to fix the test only and not the 
>> product. You can request the removal of the property in a separate bug.
>
> This property was introduced long before the macosx-port via JDK-4425878.
> If the test does not work properly because of the product bug, then 
> you should not work around it, but instead, you should create a new 
> product bug and add this test and a new bugid to the problem list for 
> macOS.
I don't agree. Java specification doesn't say that the popup menu shall 
overlap the OS taskbar. The test scenario shouldn't expect that. 
Permission to overlap taskbar is determined by the security settings and 
the platform default settings. By adding adjustPopupLocationToFit=false 
the test is abstracted from those settings which makes the overlap 
testing sensible. Otherwise the test may fail in some environments and 
platforms.
As for the mac platform where the taskbar overlapping is disabled by 
default in the toolkit. It was intentionally disabled by fixing of a bug 
reported by NetBeans team. There is JDK-7124313 reported internally 
which requests the opposite, but it requires investigation at first, it 
is not clear that we can do this.
--Semyon
>>>
>>> On 22/05/2019 13:27, semyon.sadetsky at oracle.com wrote:
>>>> JBS: https://bugs.openjdk.java.net/browse/JDK-8196096
>>>>
>>>> webrev: http://cr.openjdk.java.net/~ssadetsky/8196096/webrev.00/
>>>>
>>>> This is a fix for an unstable test:
>>>>
>>>> - inside EDT execution is ensured where necessary.
>>>>
>>>> - To pass on the mac platform the check for lightweight popup is 
>>>> excluded and the taskbar overlapping Swing property is enabled.
>>>>
>>>>
>>>> --Semyon
>>>>
>>>
>>>
>>
>
>



More information about the swing-dev mailing list