On Wed, 14 Aug 2024 16:55:25 GMT, Martin Fox <m...@openjdk.org> wrote:
> There are rules for how a dispatcher works. A dispatcher that follows those > rules can still break this PR. Here are the rules (in EventDispatcher interface): /** * Dispatches the specified event by this {@code EventDispatcher}. Does * any required event processing. Both the event and its further path can * be modified in this method. If the event is not handled / consumed during * the capturing phase, it should be dispatched to the rest of the chain * ({@code event = tail.dispatch(event);}). * * @param event the event do dispatch * @param tail the rest of the chain to dispatch event to * @return the return event or {@code null} if the event has been handled / * consumed */ I don't see where it talks about creating new events, handling of cloned events and their `::isConsumed` in the context of EH. The null return value, in my opinion, is only significant in the context of further event dispatching: null means no more dispatch. If the dispatcher does something outside of the scope of event dispatching, it's the responsibility of the said dispatcher to deal with the consequences. I don't see how this relates to the narrow scope of this PR. ------------- PR Comment: https://git.openjdk.org/jfx/pull/1523#issuecomment-2289832635