code: public void removeListener(EventListener l) {
          if (l == null) {
              throw new NullPointerException();
          }
          synchronized (notifyLock) {
              if (listeners != null) {
                  // identity equality check
                  Iterator<EventListener> iter = listeners.iterator();
                  while (iter.hasNext()) {
                      if (iter.next() == l) {
                          iter.remove();
                          if (listeners.size() == 0) {
                              listeners = null;
                          }
                          return;
                      }
                  }
              }
          }
      }
docs: Stop notifying this listener.  The listener must
  not be null.  Attemps to remove a listener that is
  not registered will be silently ignored.