for (CheckResult c : record.getErrors()) {
// Flatten tree to list and assign keys
List<CheckTreeItem> results = CheckTreeItem.flatten(c, nodeKeyGenerator, -1);
for (CheckTreeItem treeItem : results) {
Record errorRecord = new ImmutableErrorRecordImpl(record, treeItem);
errorRecords.add(errorRecord);
}
}
return errorRecords;
}