[7u12] Request for approval for 7177111 - Jcomponent.AccessibleJComponent.AddPropertyListeners adds exponential listeners

Pete Brunet peter.brunet at oracle.com
Thu Dec 13 06:35:01 PST 2012


Thanks Edvard.  7179482 is open and includes this fix plus a few more. 
It has been approved and will be pushed soon.  Is that sufficient?  -Pete

On 12/13/12 2:00 AM, Edvard Wendelin wrote:
> Approved. Just make sure you open a backport targeted to 8 so that you
> don't forget about the forward-port.
>
> Cheers,
> Edvard
>
> On 12/12/2012 10:55 PM, Pete Brunet wrote:
>> This is a request to push the following to 7u12:
>>
>> 7177111 - Jcomponent.AccessibleJComponent.AddPropertyListeners adds
>> exponential listeners.
>> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7177111
>>
>> Problem
>> When an AT (Assistive Technology, such as a screen reader) accesses a
>> Java application with several nested frames, too many property change
>> listeners are added resulting in a severe performance impact for an
>> AT user.
>>   The issue is due to the fact that there is an
>> accessibleContainerHandler
>> field in both javax.swing.JComponent.AccessibleJComponent and its
>> superclass, java.awt.Container.AccessibleAWTContainer.  When an AT calls
>> JComponent.AccessibleJComponent.addPropertyChangeListener a handler is
>> new'd and assigned to its accessibleContainerHandler field and then the
>> same method in the superclass is called and it also new's and assigns a
>> handler to its accessibleContainerHandler field.  Since there are two
>> handlers, when a child component is later added there are two callbacks
>> and for each one the AT will call addPropertyChangeListener, each of
>> which will add two handlers.  For deeply nested trees the explosion of
>> events has a negative impact on performance, i.e. there are 2 handlers
>> added for the first level, 4 for the second level, 8 for the third
>> level, etc.
>>   Solution
>> Remove protected field
>> javax.swing.JComponent.AccessibleJComponent.accessibleContainerHandler.
>> Instead, the protected field of the same name in
>> java.awt.Container.AWTAccessibleContainer will be used.
>>
>> Notes:
>> - The same fix is also one of a set of fixes for 7179482 which will go
>> into 8.
>> - Both 7177111 and 7179482 have been reviewed and approved by Artem
>> Ananiev, Anthony Petrov, and Alexandr Scherbatiy.
>> - See the reviews at:
>>    -
>> http://mail.openjdk.java.net/pipermail/swing-dev/2012-November/002332.html
>>
>>    -
>> http://mail.openjdk.java.net/pipermail/awt-dev/2012-November/003829.html
>> - See the code change at:
>> http://cr.openjdk.java.net/~ptbrunet/7177111/webrev.03/
>> - It has been determined that this fix will not cause a binary
>> incompatibility.
>>
>> Thank you,
>> Pete
>>
>>
>>
>
>




More information about the jdk7u-dev mailing list