RFR: 8252936: Optimize removal of listeners from ExpressionHelper.Generic
Jeanette Winzenburg
fastegal at openjdk.java.net
Fri Mar 5 16:05:36 UTC 2021
On Wed, 12 Feb 2020 12:01:03 GMT, dannygonzalez <github.com+6702882+dannygonzalez at openjdk.org> wrote:
>
> Although that does seem odd behaviour to me. Obviously as the original implementation was using an array I can see how the implementation drove that specification.
>
whatever drove it (had been so since the beginning ot java desktop, at least since the days of swing), there is no way to change it, is it?
> Non of the JavaFx unit tests test for that specific case as the unit tests all passed. It would be nice if there was a specific test case for this behaviour.
>
yeah, the test coverage is ... not optimal :)
> I would need to store a registration count for each listener to satisfy this requirement.
a count plus some marker as to where it was added:
addListener(firstL)
addListener(secondL)
addListener(firstL)
must result in firstL.invalidated, seconL.invalidated, firstL.invalidated .. which brings us back to .. an array?
-------------
PR: https://git.openjdk.java.net/jfx/pull/108
More information about the openjfx-dev
mailing list