<Swing Dev> [8] Review Request: JDK-8069268 JComponent.AccessibleJComponent.addPropertyListeners adds exponential listeners
Vivi An
vivi.an at oracle.com
Fri Feb 13 19:55:56 UTC 2015
Hello,
This is a retroactively review request.
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
Patch: http://cr.openjdk.java.net/~van/8069268/8069268.v2
Original review has been finished by Pete Brunet and Sergey Bylokhov.
Thank you
Regards,
Vivi
More information about the jdk8u-dev
mailing list