On Mon, 31 Jul 2023 13:39:06 GMT, John Hendrikx <jhendr...@openjdk.org> wrote:

>> Michael Strauß has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Make TransitionEvent final
>
> modules/javafx.graphics/src/main/java/javafx/scene/Node.java line 8968:
> 
>> 8966: 
>> 8967:         for (TransitionTimer<?, ?> timer : transitionTimers) {
>> 8968:             if (timer.getProperty() == property) {
> 
> minor: this probably works, but I'd still use `equals` here

Why would this be a sensible thing to do? I'm quite explicitly comparing the 
identity of `property`, since I'm interested in finding the one property that 
I'm looking for, not potentially any property that is in some way "equal" to 
the property.

For (hopefully) all property implementations, `equals` trivially works because 
it is not an overridden method and therefore falls back to an identity 
comparison. What would it even mean for a property to be equal, but not 
identical to another property?

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

PR Review Comment: https://git.openjdk.org/jfx/pull/870#discussion_r1279711683

Reply via email to