On Mon, 13 Jul 2026 21:17:49 GMT, John Hendrikx <[email protected]> wrote:
>> ok, you convinced me. would it be possible to write a condensed version of
>> this explanations in the test's comments?
>
> I will do so
Updated with this comment (the previous one did seem misleading):
/*
* Properties which track whether they are observed must always remain
aware
* of whether there are listeners or not. For this purpose, the internal
* listener removal path returns a boolean flag, indicating whether any
listeners
* are still left or not.
*
* As this is the only means by which such properties can know whether
they
* are still being observed themselves, we cannot allow weak listeners
to
* be removed during operations other than addListener or
removeListener (unless
* we make such removals go through the expected removeListener path
somehow).
*
* The addListener call is safe by default, as at least one listener
must be present
* after the call completes, and so removing any dead weak listeners
will not
* impact the observed state.
*/
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1081#discussion_r3575069730