private void addMessage(Set<ReportItem> reports, NodeId id, String message, ReportItem.Type type) {
if (reports != null || listener != null) {
ReportItem ri = new ReportItemImpl(id.toString(), message, type);
if (reports != null) {
reports.add(ri);
}
if (listener != null) {