for (int i = 0; i < current.nListeners; i++)
while (iter.hasNext())
  private void notifyNode(DomEvent e,                          DomNode current,                          boolean capture,                          ListenerRecord[] notificationSet)  {    int count = 0;    // do any of this set of listeners get notified?    for (int i = 0; i < current.nListeners; i++)      {        ListenerRecord rec = current.listeners[i];        if (rec.useCapture != capture)          {            continue;          }        if (!e.type.equals (rec.type))           {            continue;          }        if (count >= notificationSet.length)          {            // very simple growth algorithm            int len = Math.max(notificationSet.length, 1);            ListenerRecord[] tmp = new ListenerRecord[len * 2];            System.arraycopy(notificationSet, 0, tmp, 0,                             notificationSet.length);            notificationSet = tmp;          }        notificationSet[count++] = rec;      }    // Notify just those listeners    e.currentNode = current;     for (int i = 0; i < count; i++)      {        try          {            // Late in the DOM CR process (3rd or 4th CR?) the            // removeEventListener spec became asymmetric with respect            // to addEventListener ... effect is now immediate.            for (int j = 0; j < current.nListeners; j++)              {                if (current.listeners[j].equals(notificationSet[i]))                  {                    notificationSet[i].listener.handleEvent(e);                    break;                  }              }                      }        catch (Exception x)          {            // ignore all exceptions          }        notificationSet[i] = null;		// free for GC      }  }