From feaedb037b21946dd08d06cac60dc7d525443ccf Mon Sep 17 00:00:00 2001 From: Bruno Salmon Date: Mon, 30 Oct 2023 11:21:56 +0000 Subject: [PATCH] Fixed possible ClassCastException on DirectEvent duplicates --- .../src/main/java/com/sun/javafx/event/DirectEvent.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webfx-kit/webfx-kit-javafxbase-emul/src/main/java/com/sun/javafx/event/DirectEvent.java b/webfx-kit/webfx-kit-javafxbase-emul/src/main/java/com/sun/javafx/event/DirectEvent.java index c7c61ca625..4277c4a7a3 100644 --- a/webfx-kit/webfx-kit-javafxbase-emul/src/main/java/com/sun/javafx/event/DirectEvent.java +++ b/webfx-kit/webfx-kit-javafxbase-emul/src/main/java/com/sun/javafx/event/DirectEvent.java @@ -28,4 +28,9 @@ public DirectEvent(Event originalEvent, Object source, EventTarget target) { public Event getOriginalEvent() { return originalEvent; } + + @Override + public Event duplicate() { + return new DirectEvent(originalEvent, source, target); + } }