On Mon, 21 Sep 2026 23:54:21 GMT, Michael Strauß <[email protected]> wrote:

>> John Hendrikx has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Implement notifying boolean
>
> modules/javafx.base/src/main/java/javafx/beans/Observable.java line 57:
> 
>> 55:  *     <li>A listener that is removed while a notification is in 
>> progress is not
>> 56:  *         notified as part of that notification if it has not been 
>> notified yet, and
>> 57:  *         is not renotified if it has already been notified.
> 
> If a listener has already been notified, and then it is removed, what could 
> it possibly be re-notified of? I understand that you're saying it's _not_ 
> notified again, but I don't understand why you would even say that.

Yes, I think that "A listener that is removed while a notification is in 
progress is not notified as part of that notification if it has not been 
notified yet" is enough.

> modules/javafx.base/src/main/java/javafx/beans/value/ObservableValue.java 
> line 104:
> 
>> 102:  *         {@code oldValue} is equal to the value that was reported as 
>> {@code newValue}
>> 103:  *         in the previous notification delivered to that listener.
>> 104:  *     <li>If a change listener modifies the value in its callback, the 
>> change
> 
> It might be clearer to say "ObservableValue" instead of "value".

I think that "value" is better. The listener changes the wrapped value in the 
`ObservableValue`, not the `ObservableValue` itself.

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

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

Reply via email to