fix nullpoint exception
@@ -91,12 +91,16 @@ public class SubscriptionContext {
synchronized (this) {
// 1st, find out subscribe the moduleID
Set moduleSubscriber = moduleMap.get(moduleID);
+ if (moduleSubscriber != null) {
result.addAll(moduleSubscriber);
+ }
// 2nd, find out subscribe the event
Set eventSubscriber = eventMap.get(eventName.toLowerCase());
+ if (eventSubscriber != null) {
result.addAll(eventSubscriber);
}
+ }
return result;
}
