// Take a copy of a reference to the array of listeners just in case
// it is modified by one of the listeners.
List listeners = diagnosticListeners;
for (int i = 0; i < listeners.size(); i++) {
DiagnosticListener listener = (DiagnosticListener) listeners.get(
i);
listener.diagnosticsChanged(event);
}
}
}