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

View File

@ -80,9 +80,12 @@ public void addDuplicationStrategy(DuplicationStrategy strategy) {
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