RFR: 8290310: ChangeListener events are incorrect or misleading when a nested change occurs [v11]

Nir Lisker nlisker at openjdk.org
Wed Mar 12 01:38:01 UTC 2025


On Wed, 12 Mar 2025 01:29:26 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:

>> Is a switch expression on `listenerData` not suitable here?
>
> This is a really hot code path, and the current version came out best in the benchmarks. I didn't try modify this one for that reason.  I did try for the `removeListener` code (as performance is irrelevant there), but it was a poor fit for `switch` (duplicate cases, duplicate code, and can't do fall through or multiple options with `when` expressions it seems...)

If the benchmarks deem this a better implementation then it's fine. I was just wondering if it was missed.

The `removeListener` one is indeed not as appetizing.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1081#discussion_r1990392759


More information about the openjfx-dev mailing list