fix: 测试计划报告缺陷统计报错

This commit is contained in:
chenjianxing 2021-07-21 14:24:00 +08:00 committed by jianxing
parent 70702c14a0
commit da89d67b25
1 changed files with 10 additions and 1 deletions

View File

@ -840,7 +840,16 @@ public class TestPlanService {
}
}
issues.addAll(issue);
Collections.sort(issues, Comparator.comparing(Issues::getCreateTime, (t1, t2) -> t2.compareTo(t1)));
Collections.sort(issues,
Comparator.comparing(Issues::getCreateTime, (t1, t2) -> {
if (t1 == null) {
return 1;
} else if (t2 == null) {
return -1;
}
return t2.compareTo(t1);
})
);
}
components.forEach(component -> {
component.readRecord(testCase);