<Swing Dev> [9] Backport Request: JDK-8069268 JComponent.AccessibleJComponent.addPropertyListeners adds exponential listeners
Vivi An
vivi.an at oracle.com
Wed Feb 18 18:59:55 UTC 2015
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