<Swing Dev> [12]RFR: JDK-6714324: Removing a component from a JTabbedPane does not clear its accessibleParent
Shashidhara Veerabhadraiah
shashidhara.veerabhadraiah at oracle.com
Mon Dec 17 08:11:55 UTC 2018
Hi Krishna, The changes looks fine to me.
Thanks and regards,
Shashi
-----Original Message-----
From: Krishna Addepalli
Sent: Friday, December 14, 2018 2:38 PM
To: Shashidhara Veerabhadraiah <shashidhara.veerabhadraiah at oracle.com>; Sergey Bylokhov <sergey.bylokhov at oracle.com>; swing-dev at openjdk.java.net
Subject: RE: <Swing Dev> [12]RFR: JDK-6714324: Removing a component from a JTabbedPane does not clear its accessibleParent
Thanks for the comments Shashi!
1. For the other variation, the accessible parent is never set. This is an overridden function (coming from Container), which allows developers to add multiple child components to a component. However, I bolstered the testcase to check this scenario. In this case, the accessibleContext should be null even after adding/removing the component.
2. Good catch. I modified the code to handle this scenario as well. Here is the new webrev: http://cr.openjdk.java.net/~kaddepalli/6714324/webrev01/
Thanks,
Krishna
-----Original Message-----
From: Shashidhara Veerabhadraiah
Sent: Thursday, December 13, 2018 11:37 AM
To: Sergey Bylokhov <sergey.bylokhov at oracle.com>; Krishna Addepalli <krishna.addepalli at oracle.com>; swing-dev at openjdk.java.net
Subject: RE: <Swing Dev> [12]RFR: JDK-6714324: Removing a component from a JTabbedPane does not clear its accessibleParent
Hi Krishna, I am trying to understand the class JTabbedPane with this review. I have got some questions while doing, so please clarify it.
1. There is another variation of remove, remove(Component comp) line: 1034, where they remove the requested component from the container tree(if out of bound) and may be you need to set the accessible parent to null there as well. Probably you can add a test case to the test as well for this case(out of bound).
2. Another place where they need to remove is the setComponentAt() line: 1542 where they swap the existing component with the requested component. Since the existing component is removed from it's container tree, you might need to set the accessible parent to null there as well I think.
Thanks and regards,
Shashi
-----Original Message-----
From: Sergey Bylokhov
Sent: Thursday, December 13, 2018 2:22 AM
To: Krishna Addepalli <krishna.addepalli at oracle.com>; swing-dev at openjdk.java.net
Subject: Re: <Swing Dev> [12]RFR: JDK-6714324: Removing a component from a JTabbedPane does not clear its accessibleParent
Thank you for clarification,
the fix looks fine then.
On 05/12/2018 06:49, Krishna Addepalli wrote:
> Hi Sergey,
>
> Thanks for your suggestions.
> I looked at those classes, and all of them are created when the functions "getAccessibleChild" or "getAccessibleChildAt" are called. Everytime these functions are called, a new instance of the class is created and returned.
> Also, these classes look like to be short-lived. I saw that for example AccessibleJListChild object is created inside a property change function in JList.
>
> Thanks,
> Krishna
>
> -----Original Message-----
> From: Sergey Bylokhov
> Sent: Saturday, December 1, 2018 6:58 AM
> To: Krishna Addepalli <krishna.addepalli at oracle.com>; swing-dev at openjdk.java.net
> Subject: Re: <Swing Dev> [12]RFR: JDK-6714324: Removing a component from a JTabbedPane does not clear its accessibleParent
>
> Hi, Krishna.
>
> As far as I understand the bug is reproduced because the "Page"
> class sets its accessibility parent in the constructor and never reset it to "null".
>
> The same code exists in the other classes as well:
> AccessibleJTableHeaderEntry, AccessibleJTableHeaderCell, AccessibleJTableCell, AccessibleJListChild, AccessibleAWTListChild.
>
> Can you please check them as well.
>
> On 29/11/2018 21:04, Krishna Addepalli wrote:
>> Hello,
>>
>> Can someone review this simple fix?
>>
>> Thanks,
>> Krishna
>>
>>> On 23-Nov-2018, at 12:42 PM, Krishna Addepalli <krishna.addepalli at oracle.com <mailto:krishna.addepalli at oracle.com>> wrote:
>>>
>>> Hi All,
>>> Please review a simple fix for
>>> JDK-6714324:https://bugs.openjdk.java.net/browse/JDK-6714324
>>> Webrev:http://cr.openjdk.java.net/~kaddepalli/6714324/webrev00
>>> The problem is when a tab component is added, and if there is an AccessibleContext defined for JTabbedPane, then that is added as a parent to the tab component being added, but while removing the same, the reference is still not cleared.
>>> This fix removes the reference to the accessibleParent in the child tab component.
>>> Thanks,
>>> Krishna
>>
>
>
> --
> Best regards, Sergey.
>
--
Best regards, Sergey.
More information about the swing-dev
mailing list