Skip to content

Commit

Permalink
Fixed a minor thing, now EventBus will not go farther then the base c…
Browse files Browse the repository at this point in the history
…lass of an IEventType flag
  • Loading branch information
RealMangorage committed Aug 25, 2024
1 parent 7a94dee commit 6b3b987
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 52 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/mangorage/eventbus/EventBus.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private <E extends IEvent> ListenerList<E> getListenerList(Class<E> eventClass,
var list = LISTENERS.get(key);

if (list != null) return (ListenerList<E>) list;
if (((Class<?>) eventClass) == Object.class) return null;
if (((Class<?>) eventClass) == Object.class || !flagType.isAssignableFrom(eventClass)) return null;

// Cant store listeners for a Generic Event if there is no genericType!!
if (genericType == null && IGenericEvent.class.isAssignableFrom(eventClass)) return null;
Expand Down
51 changes: 0 additions & 51 deletions src/main/java/org/mangorage/eventbus/event/Test.java

This file was deleted.

0 comments on commit 6b3b987

Please sign in to comment.