<Swing Dev> [9] Backport Request: JDK-8069268 JComponent.AccessibleJComponent.addPropertyListeners adds exponential listeners
Vivi An
vivi.an at oracle.com
Tue Feb 17 00:34:42 UTC 2015
Hello,
Could you please approve straight backport the bug fix in JDK8 to JDK9?
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
Thank you
Regards,
Vivi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20150216/9201a7a9/attachment.html>
More information about the swing-dev
mailing list