Fix NullPointerException when no subscriber for slow event (#3835)
This commit is contained in:
parent
5e4429f0e4
commit
565557c5c5
@ -96,6 +96,10 @@ public class DefaultSharePublisher extends DefaultPublisher {
|
||||
|
||||
// Get for Map, the algorithm is O(1).
|
||||
Set<Subscriber> subscribers = subMappings.get(slowEventType);
|
||||
if (null == subscribers) {
|
||||
LOGGER.debug("[NotifyCenter] No subscribers for slow event {}", slowEventType.getName());
|
||||
return;
|
||||
}
|
||||
|
||||
// Notification single event subscriber
|
||||
for (Subscriber subscriber : subscribers) {
|
||||
|
@ -132,6 +132,7 @@ public class NotifyCenterTest {
|
||||
return ExpireEvent.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean ignoreExpireEvent() {
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user