On Fri, 22 Jan 2021 21:31:42 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

>> John Hendrikx has updated the pull request with a new target base due to a 
>> merge or a rebase. The pull request now contains one commit:
>> 
>>   WIP: Moved treeShowingProperty into its own class
>
> modules/javafx.controls/src/main/java/javafx/scene/control/skin/ProgressIndicatorSkin.java
>  line 137:
> 
>> 135: 
>> 136:         treeShowingExpression = new TreeShowingExpression(control);
>> 137:         treeShowingExpression.addListener((obs, old, current) -> 
>> updateAnimation());
> 
> Is there a reason not to still use `registerChangeListener` for this?

`registerChangeListener` can be used here, I just didn't see it.  However, 
there is no need to unregister the listener from the expression (it is local to 
the skin, it will never have more than one listener and will be GC'd with the 
Skin).  I will change it though, as it looks a bit cleaner, and there is no 
harm unregistering the listener.

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

PR: https://git.openjdk.java.net/jfx/pull/185

Reply via email to