From f759797ec3668ba8ba090e85c40ed26ea7ddbb1c Mon Sep 17 00:00:00 2001 From: pacien Date: Sat, 3 Feb 2018 18:12:42 +0100 Subject: Fix event class filtering Signed-off-by: pacien --- src/main/java/fr/umlv/java/wallj/event/Events.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/fr/umlv/java/wallj/event/Events.java b/src/main/java/fr/umlv/java/wallj/event/Events.java index da8b199..b7166b0 100644 --- a/src/main/java/fr/umlv/java/wallj/event/Events.java +++ b/src/main/java/fr/umlv/java/wallj/event/Events.java @@ -18,7 +18,7 @@ public final class Events { */ public static Stream filter(List eventList, Class eventClass) { return eventList.stream() - .filter(e -> e.getClass().isInstance(eventClass)) + .filter(e -> e.getClass().isAssignableFrom(eventClass)) .map(eventClass::cast); } -- cgit v1.2.3