I am getting the warning: 

> 
> [unchecked] Possible heap pollution from parameterized vararg type Class
> 
> 
> 

But I am unsure if it will actually pollute:

```
public void register(EventListener listener, Class<? extends Event>... eventTypes) {}

```

Here is the complete implementation if that is necessary:

```
public class EventDispatcher {

    public static ConcurrentLinkedQueue<Event> eventQueue;
    public static ConcurrentHashMap<Class<? extends Event>, CopyOnWriteArrayList<EventListener>> eventsListenerMap =
            new ConcurrentHashMap<>();

    public static void register(EventListener listener, Class<? extends Event>... eventTypes) {
        for (Class<? extends Event> eventType : eventTypes) {
            if (eventsListenerMap.containsKey(eventType)) {
                eventsListenerMap.get(eventType).addIfAbsent(listener);
            } else {
                CopyOnWriteArrayList<EventListener> initializingListeners =
                        new CopyOnWriteArrayList<>();
                initializingListeners.add(listener);
                eventsListenerMap.put(eventType, initializingListeners);
            }
        }
    }
}

```

I am all up for OT-suggestions for improving this, too, but keep in mind that this class is unfinished.