Fix subclass inclusion in EventBus
This commit is contained in:
		@@ -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