<Swing Dev> [8] Approval Request: JDK-8069268 JComponent.AccessibleJComponent.addPropertyListeners adds exponential listeners

Seán Coffey sean.coffey at oracle.com
Wed Feb 18 19:09:40 UTC 2015


Thanks for following up on this request Vivi.

Approved.

regards,
Sean.

On 18/02/2015 19:07, Vivi An wrote:
> Sorry correct subject now...
>
> Review: 
> http://mail.openjdk.java.net/pipermail/jdk8u-dev/2015-February/003072.html
>
> Thanks
>
> Vivi
>
> On 2/18/2015 10:59 AM, Vivi An wrote:
>> Hello,
>>
>> Please approve below bug fix in jdk8u-dev.
>>
>> Bug Description:
>> In Component/Container/JComponent's AccessibleContext inner classes, 
>> a private variable propertyListenersCount is used to make sure a 
>> specific listener is only added once through 
>> addPropertyChangeListener. However, ContainerListener which declared 
>> in Container's inner class was added to PropertyChangeListener in 
>> both Container and it's child class,*in case of nested levels 
>> us*ed,*  exponential listeners will be adde*d and lead to performance 
>> issue*. *
>> ***
>> **Fix Description:
>> The fix removed code in AccessibleJComponent(Inner class of 
>> JComponent*) which *add*ing *listener**declared *and*added as 
>> property change listener through parent class. This way, the listener 
>> won't be added twice and lead to exponential listeners added in 
>> nested levels case.*
>>
>> **
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8069268
>> JDK8 Changeset: 
>> http://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/rev/aafe81a686a2
>>
>> Review completed by Pete Brunet and Sergey Bylokhov.
>>
>> Thank you
>>
>> Regards,
>>
>> Vivi 
>



More information about the jdk8u-dev mailing list