HHH-13477 Make heavily invoked method final: EventListenerGroupImpl#listeners()

This commit is contained in:
Sanne Grinovero 2019-06-24 22:06:20 +01:00
parent e532820240
commit 6e1a84b05d
1 changed files with 5 additions and 2 deletions

View File

@ -80,9 +80,12 @@ class EventListenerGroupImpl<T> implements EventListenerGroup<T> {
duplicationStrategies.add( strategy );
}
/**
* Implementation note: should be final for performance reasons.
*/
@Override
public Iterable<T> listeners() {
return listeners == null ? Collections.emptyList() : listeners;
public final Iterable<T> listeners() {
return listeners == null ? Collections.EMPTY_LIST : listeners;
}
@Override