RunQC lastAdded = null;
List<RunQC> lqc = new ArrayList<RunQC>(r.getRunQCs());
if (!lqc.isEmpty()) {
try {
Collections.sort(lqc, new DateComparator(RunQC.class, "getQcDate"));
lastAdded = lqc.get(lqc.size()-1);
}
catch (NoSuchMethodException e) {
log.error("Cannot sort list of run QCs", e);
e.printStackTrace();