Small clean-ups in event manager.

This commit is contained in:
Andrew Steinborn
2024-09-15 17:00:15 -04:00
parent 4eb02c8d38
commit ffa78d2a92
2 changed files with 3 additions and 13 deletions

View File

@@ -33,8 +33,9 @@ class EventTypeTracker {
}
public Collection<Class<?>> getFriendsOf(final Class<?> eventType) {
if (friends.containsKey(eventType)) {
return friends.get(eventType);
ImmutableSet<Class<?>> existingFriends = friends.get(eventType);
if (existingFriends != null) {
return existingFriends;
}
final Collection<Class<?>> types = getEventTypes(eventType);

View File

@@ -156,17 +156,6 @@ public class VelocityEventManager implements EventManager {
}
}
enum AsyncType {
/**
* The complete event will be handled on an async thread.
*/
ALWAYS,
/**
* The event will never run async, everything is handled on the netty thread.
*/
NEVER
}
static final class HandlersCache {
final HandlerRegistration[] handlers;