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

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


On Tue, 11 Mar 2025 07:09:48 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:

> I think the docs (in `OldValueCachingListenerManager`) are quite clear already though why you'd use one or the other.

Alright, no need to add a note about where it's used.

> The design flaw is the use of a protected `fireValueChangedEvent` method within the property...

The "old value for properties" is interesting, but another discussion. Might be worth bringing it up on the list if there's more to it than just this extra implementation.

> You should never do all three of these for protected methods...

Yes, well, same for public and package methods. This falls under "design for inheritance or prevent it" - don't rely on an implementation that can be overridden.

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

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


More information about the openjfx-dev mailing list