Fix subclass inclusion in EventBus
This commit is contained in:
parent
470558086e
commit
1c53694d5e
@ -66,7 +66,12 @@ public class EventBus {
|
||||
* @since Envoy v0.2-alpha
|
||||
*/
|
||||
public void dispatch(Event<?> event) {
|
||||
handlers.keySet().stream().filter(event.getClass()::isAssignableFrom).map(handlers::get).flatMap(List::stream).forEach(h -> h.accept(event));
|
||||
handlers.keySet()
|
||||
.stream()
|
||||
.filter(event.getClass()::equals)
|
||||
.map(handlers::get)
|
||||
.flatMap(List::stream)
|
||||
.forEach(h -> h.accept(event));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user