On Thu, 1 Sep 2022 17:51:20 GMT, Nir Lisker <nlis...@openjdk.org> wrote:

>> John Hendrikx has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Update javadoc of "when" with better phrasing
>
> modules/javafx.base/src/main/java/javafx/beans/value/ObservableValue.java 
> line 268:
> 
>> 266:      * for garbage collection while its source isn't. However, when 
>> using {@code when} this {@code ObservableValue}
>> 267:      * can still be eligible for garbage collection when {@code 
>> condition} holds {@code false} and {@code condition}
>> 268:      * itself is also eligible for garbage collection.
> 
> I think that these 2 paragraphs can be combined. There is some repetition in 
> the last sentence ("However...") of the 1st paragraph. Maybe add to the 1st 
> paragraph at the end:
> 
>> This is in contrast to the general behavior of bindings, where the binding 
>> is never eligible for GC as long as the source isn't.
> 
> If you think it's important to note that. Then remove the 2nd paragraph?

Yes, I've changed it.  I had to rephrase it to: "This is in contrast to the 
general behavior of bindings, where the binding is only eligible for garbage 
collection when not observed itself." -- with `when` there are two options for 
allowing GC, the one I just mentioned and when `condition` is `false` and not 
referenced itself.

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

PR: https://git.openjdk.org/jfx/pull/830

Reply via email to