Fix notification sending on terminated EventDispatcher
@@ -131,6 +131,7 @@ public class EventDispatcherImpl implements EventDispatcher {
@Override
public synchronized void notify(EventType t, EventObject o) {
+ if (initialized) {
for (Map.Entry<EventCallback, ArrayList<EventFilter>> entry : eventFilter.entrySet()) {
EventCallback cb = entry.getKey();
for (EventFilter filter : entry.getValue()) {
@@ -144,6 +145,7 @@ public class EventDispatcherImpl implements EventDispatcher {
}
}
}
+ }
private void createExecutorService(EventCallback cb) {
ExecutorService executor = Executors.newSingleThreadExecutor(threadFactory);
