On Mon, 31 Jul 2023 18:16:19 GMT, Michael Strauß <[email protected]> wrote:
>> modules/javafx.graphics/src/main/java/javafx/css/TransitionEvent.java line
>> 88:
>>
>>> 86: * @param eventType the event type
>>> 87: * @param property the {@code StyleableProperty} that is targeted
>>> by the transition
>>> 88: * @param elapsedTime the time that has elapsed since the
>>> transition has entered its active period
>>
>> Can property be `null`? Any restrictions on `elapsedTime`?
>
> Added a `@throws` tag.
> Interestingly, `Event` doesn't specify or assert that its `eventType`
> parameter is non-null. Maybe we should investigate this further.
`eventType` is not used for a lot of things, aside from deciding which list of
handlers to pick. In theory, you could have a `null` `EventType`, and register
an event handler on the `null` type; except that most `addEventHandler` methods
don't allow this -- they check that the event type is not `null`.
It probably would be good to reject `null` when creating an `Event`, but that's
not for this PR.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/870#discussion_r1280688688