code: public Collection<GerritEventListener> removeAllEventListeners() {
          synchronized (this) {
              HashSet<GerritEventListener> listeners = new HashSet<GerritEventListener>(gerritEventListeners);
              gerritEventListeners.clear();
              return listeners;
          }
      }
docs: Removes all event listeners and returns those that where removed.
  
  @return the former list of listeners.